Package com.jme3.network.kernel
Interface Endpoint
- All Known Implementing Classes:
NioEndpoint
,UdpEndpoint
public interface Endpoint
An abstract endpoint in a Kernel that can be used for
sending/receiving messages within the kernel space.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this endpoint without flushing any of its currently enqueued outbound data.void
close
(boolean flushData) Closes this endpoint, optionally flushing any queued data before closing.Returns the transport specific remote address of this endpoint as a string.long
getId()
Returns an ID that is unique for this endpoint within its Kernel instance.Returns the kernel to which this endpoint belongs.boolean
Returns true if this endpoint is currently connected.void
send
(ByteBuffer data) Sends data to the other end of the connection represented by this endpoint.
-
Method Details
-
getId
long getId()Returns an ID that is unique for this endpoint within its Kernel instance. -
getAddress
String getAddress()Returns the transport specific remote address of this endpoint as a string. This may or may not be unique per endpoint depending on the type of transport. -
getKernel
Kernel getKernel()Returns the kernel to which this endpoint belongs. -
isConnected
boolean isConnected()Returns true if this endpoint is currently connected. -
send
Sends data to the other end of the connection represented by this endpoint. -
close
void close()Closes this endpoint without flushing any of its currently enqueued outbound data. -
close
void close(boolean flushData) Closes this endpoint, optionally flushing any queued data before closing. As soon as this method is called, new send() calls will fail with an exception... even while close() is still flushing the earlier queued messages.
-