Public Member Functions | |
MulticastSocket () throws IOException | |
MulticastSocket (NetworkMInterface nmi) throws IOException | |
MulticastSocket (NetworkMInterface[] iter) throws IOException | |
List< Long > | getSockInterfaceIDs () throws IOException |
boolean | addInterface (int interfaceID) throws IOException |
boolean | setInterfaces (List< Integer > nmi) throws IOException |
List< NetworkMInterface > | getInterfaces () throws IOException |
boolean | delInterface (int InterfaceId) throws IOException |
void | join (URI uri) throws IOException |
void | join (String uri) throws URISyntaxException, IOException |
void | leave (String uri) throws IOException, URISyntaxException |
void | leave (URI uri) throws IOException |
MessageContent | receive () throws IOException |
boolean | nonBlockingSend (String uri, byte[] data) throws IOException, URISyntaxException |
boolean | nonBlockingSend (URI uri, byte[] data) throws IOException |
void | flush (String uri_s) |
void | send (String uri, byte[] data) throws IOException, URISyntaxException |
boolean | send (URI uri, byte[] data) throws IOException |
boolean | setTTL (int hops) throws IOException |
void | destroy () throws IOException |
void | finalize () |
implementing class of the MulticastSocket interface, For binding the application to the HAMcast middleware.
At setCheckConnectionRunnable(Runnable r) you can set the piece of code which will be executed, if an unexpected error occurs. The default exception handler writes an IOException in the java EventQueue. For example, this exception will be appear if the middleware is shutting down while the java api uses it.
Some functions throw IOException - more information with [ExceptionName].getMessage() and at libHamCast.Proxy#checkErr(long, String, String)
libHamCast.MulticastSocket.MulticastSocket | ( | ) | throws IOException |
IOException | if socket couldn't be created |
libHamCast.MulticastSocket.MulticastSocket | ( | NetworkMInterface | nmi | ) | throws IOException |
nmi | expects an instance NetworkMInterface |
IOException | if socket could not be created |
libHamCast.MulticastSocket.MulticastSocket | ( | NetworkMInterface[] | iter | ) | throws IOException |
iter | expects an array of NetworkMInterfaces |
boolean libHamCast.MulticastSocket.addInterface | ( | int | interfaceID | ) | throws IOException |
nmi | - networkMInterface you wish to add |
IOException |
boolean libHamCast.MulticastSocket.delInterface | ( | int | InterfaceId | ) | throws IOException |
removes an interface from the socket
IOException | if interfaces could not be deleted |
void libHamCast.MulticastSocket.destroy | ( | ) | throws IOException |
removes socket from global list and from socket. This method is responsible for clean destruction of an MulticastSocket object. It informs the HAMcastMiddleware and remove the socket from all global lists.
void libHamCast.MulticastSocket.finalize | ( | ) |
*for cleaning purposes
void libHamCast.MulticastSocket.flush | ( | String | uri_s | ) |
uri_s |
List<NetworkMInterface> libHamCast.MulticastSocket.getInterfaces | ( | ) | throws IOException |
List<Long> libHamCast.MulticastSocket.getSockInterfaceIDs | ( | ) | throws IOException |
IOException |
void libHamCast.MulticastSocket.join | ( | URI | uri | ) | throws IOException |
void libHamCast.MulticastSocket.join | ( | String | uri | ) | throws URISyntaxException, IOException |
void libHamCast.MulticastSocket.leave | ( | String | uri | ) | throws IOException, URISyntaxException |
IOException |
void libHamCast.MulticastSocket.leave | ( | URI | uri | ) | throws IOException |
boolean libHamCast.MulticastSocket.nonBlockingSend | ( | String | uri, |
byte[] | data | ||
) | throws IOException, URISyntaxException |
IOException |
boolean libHamCast.MulticastSocket.nonBlockingSend | ( | URI | uri, |
byte[] | data | ||
) | throws IOException |
For instant sending (doesn't block like send)
MessageContent libHamCast.MulticastSocket.receive | ( | ) | throws IOException |
is blocked until something is received
void libHamCast.MulticastSocket.send | ( | String | uri, |
byte[] | data | ||
) | throws IOException, URISyntaxException |
boolean libHamCast.MulticastSocket.send | ( | URI | uri, |
byte[] | data | ||
) | throws IOException |
This method can block if there is not enough free space in the buffer. Use nonBlockingSend for a sending attempt which returns an message of success
IOException | if Message couldn't be send |
InterruptedException |
boolean libHamCast.MulticastSocket.setInterfaces | ( | List< Integer > | nmi | ) | throws IOException |
overwrites the current interfaces which are used by the socket.
nmi | - List of Interfaces you wish to set, precondition: nmi is not empty. |
IOExceptional |
boolean libHamCast.MulticastSocket.setTTL | ( | int | hops | ) | throws IOException |
sets time-to-live if underlaying network supports it.