|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectorg.xsocket.datagram.MulticastEndpoint
public final class MulticastEndpoint
non blocking Mutlicast endpoint
Caused by the missing channel support for multicast Datagram (JSE 6.0) this
class is implemented by using the "classic" MulticastSocket
| Field Summary |
|---|
| Fields inherited from interface org.xsocket.datagram.IEndpoint |
|---|
DEFAULT_HOST_ADDRESS, IP_MULTICAST_LOOP, IP_MULTICAST_TTL, IP_TOS, SO_BROADCAST, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF |
| Constructor Summary | |
|---|---|
MulticastEndpoint(java.net.InetAddress address,
int port)
Constructs a datagram socket and connects it to the given address |
|
MulticastEndpoint(java.net.InetAddress address,
int port,
DatagramSocketConfiguration socketConfiguration)
Deprecated. |
|
MulticastEndpoint(java.net.InetAddress address,
int port,
DatagramSocketConfiguration socketConfiguration,
int receiveSize,
IDatagramHandler datagramHandler)
Deprecated. |
|
MulticastEndpoint(java.net.InetAddress address,
int port,
DatagramSocketConfiguration socketConfiguration,
int receiveSize,
IDatagramHandler datagramHandler,
java.util.concurrent.Executor workerPool)
Deprecated. |
|
MulticastEndpoint(java.net.InetAddress address,
int port,
int receiveSize,
IDatagramHandler datagramHandler)
Constructs a datagram socket and connects it to the given address |
|
MulticastEndpoint(java.net.InetAddress address,
int port,
int receiveSize,
IDatagramHandler datagramHandler,
java.util.concurrent.Executor workerPool)
Constructs a datagram socket and connects it to the given address |
|
MulticastEndpoint(java.net.InetAddress address,
int port,
java.util.Map<java.lang.String,java.lang.Object> options,
int receiveSize,
IDatagramHandler datagramHandler,
java.util.concurrent.Executor workerPool)
Constructs a datagram socket and connects it to the given address |
|
MulticastEndpoint(java.lang.String address,
int port,
DatagramSocketConfiguration socketConfiguration,
int receiveSize,
IDatagramHandler datagramHandler)
Deprecated. |
|
MulticastEndpoint(java.lang.String address,
int port,
int receiveSize,
IDatagramHandler datagramHandler)
Constructs a datagram socket and connects it to the given address |
|
| Method Summary | |
|---|---|
void |
close()
|
java.lang.String |
getDefaultEncoding()
gets the default encoding used by this endpoint |
java.lang.String |
getId()
return the id |
java.net.InetAddress |
getLocalAddress()
returns the address of the endpoint |
int |
getLocalPort()
returns the port of the endpoint |
java.net.SocketAddress |
getLocalSocketAddress()
Deprecated. |
java.lang.Object |
getOption(java.lang.String name)
returns the vlaue of a option |
java.util.Map<java.lang.String,java.lang.Class> |
getOptions()
Returns an unmodifiable map of the options supported by this endpont. |
int |
getReceiveSize()
get the size of the datagram that will be received |
java.net.SocketAddress |
getRemoteSocketAddress()
return the connected remote address or null if not connected |
java.net.SocketOptions |
getSocketOptions()
Deprecated. |
java.util.concurrent.Executor |
getWorkerpool()
return the worker pool |
IWorkerPool |
getWorkerPool()
Deprecated. |
boolean |
isOpen()
returns, if the endpoint is open |
UserDatagram |
receive()
receive a datagram packet (receive timeout = 0) |
UserDatagram |
receive(long timeoutMillis)
receive a datagram packet |
void |
send(UserDatagram packet)
send a datagram to the remote endpoint |
void |
setDefaultEncoding(java.lang.String defaultEncoding)
sets the default encoding used by this endpoint |
void |
setReceiveSize(int receivePacketSize)
set the size of the datagram that will be received |
void |
setWorkerPool(IWorkerPool workerPool)
Deprecated. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xsocket.datagram.IEndpoint |
|---|
getDefaultEncoding, getId, getReceiveSize, receive, receive, setDefaultEncoding, setReceiveSize, setWorkerPool |
| Constructor Detail |
|---|
public MulticastEndpoint(java.net.InetAddress address,
int port)
throws java.io.IOException
address - the group addressport - the port
java.io.IOException - If some I/O error occurs
public MulticastEndpoint(java.net.InetAddress address,
int port,
DatagramSocketConfiguration socketConfiguration)
throws java.io.IOException
java.io.IOException
public MulticastEndpoint(java.lang.String address,
int port,
int receiveSize,
IDatagramHandler datagramHandler)
throws java.io.IOException
address - the group addressport - the portreceiveSize - the size of the data packet to receivedatagramHandler - the datagram handler
java.io.IOException - If some I/O error occurs
public MulticastEndpoint(java.lang.String address,
int port,
DatagramSocketConfiguration socketConfiguration,
int receiveSize,
IDatagramHandler datagramHandler)
throws java.io.IOException
java.io.IOException
public MulticastEndpoint(java.net.InetAddress address,
int port,
int receiveSize,
IDatagramHandler datagramHandler)
throws java.io.IOException
address - the group addressport - the portreceiveSize - the size of the data packet to receivedatagramHandler - the datagram handler
java.io.IOException - If some I/O error occurs
public MulticastEndpoint(java.net.InetAddress address,
int port,
int receiveSize,
IDatagramHandler datagramHandler,
java.util.concurrent.Executor workerPool)
throws java.io.IOException
address - the group addressport - the portreceiveSize - the size of the data packet to receivedatagramHandler - the datagram handlerworkerPool - the workerPool
java.io.IOException - If some I/O error occurs
public MulticastEndpoint(java.net.InetAddress address,
int port,
DatagramSocketConfiguration socketConfiguration,
int receiveSize,
IDatagramHandler datagramHandler)
throws java.io.IOException
java.io.IOException
public MulticastEndpoint(java.net.InetAddress address,
int port,
DatagramSocketConfiguration socketConfiguration,
int receiveSize,
IDatagramHandler datagramHandler,
java.util.concurrent.Executor workerPool)
throws java.io.IOException
java.io.IOException
public MulticastEndpoint(java.net.InetAddress address,
int port,
java.util.Map<java.lang.String,java.lang.Object> options,
int receiveSize,
IDatagramHandler datagramHandler,
java.util.concurrent.Executor workerPool)
throws java.io.IOException
address - the group addressport - the portoptions - the socket optionsreceiveSize - the size of the data packet to receivedatagramHandler - the datagram handlerworkerPool - the workerPool
java.io.IOException - If some I/O error occurs| Method Detail |
|---|
public java.net.SocketOptions getSocketOptions()
public java.lang.String toString()
public void close()
close in interface java.io.Closeablepublic java.net.SocketAddress getLocalSocketAddress()
getLocalSocketAddress in interface IEndpointpublic java.net.InetAddress getLocalAddress()
getLocalAddress in interface IEndpointpublic int getLocalPort()
getLocalPort in interface IEndpointpublic java.net.SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in interface IConnectedEndpointpublic boolean isOpen()
isOpen in interface IEndpoint
public void send(UserDatagram packet)
throws ClosedConnectionException,
java.io.IOException
send in interface IEndpointpacket - the datagram to send
ClosedConnectionException - if the underlying channel is closed
java.io.IOException - If some other I/O error occurs
public java.lang.Object getOption(java.lang.String name)
throws java.io.IOException
getOption in interface IEndpointname - the name of the option
java.io.IOException - In an I/O error occurspublic java.util.Map<java.lang.String,java.lang.Class> getOptions()
IEndpoint
getOptions in interface IEndpointpublic void setWorkerPool(IWorkerPool workerPool)
setWorkerPool in interface IEndpointworkerPool - the worker pool to usepublic IWorkerPool getWorkerPool()
public java.util.concurrent.Executor getWorkerpool()
public final void setReceiveSize(int receivePacketSize)
setReceiveSize in interface IEndpointreceivePacketSize - the receive sizepublic final int getReceiveSize()
getReceiveSize in interface IEndpoint
public final UserDatagram receive(long timeoutMillis)
throws java.io.IOException,
java.net.SocketTimeoutException
receive in interface IEndpointtimeoutMillis - the receive timeout in millis
java.net.SocketTimeoutException - If the receive timeout has been reached
java.io.IOException - If some other I/O error occurspublic UserDatagram receive()
IEndpoint
receive in interface IEndpointpublic final java.lang.String getDefaultEncoding()
getDefaultEncoding in interface IEndpointpublic final void setDefaultEncoding(java.lang.String defaultEncoding)
setDefaultEncoding in interface IEndpointdefaultEncoding - the default encodingpublic final java.lang.String getId()
getId in interface IEndpoint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||