|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RMISocketFactory
twcsckernel.projectbase.rmi.socketfactory.ServerTwoWaySocketFactory
public class ServerTwoWaySocketFactory
Server side socket factory which allows the server to make callbacks to a client whose address is unreachable from the server (as long as the server is reachable from the client).
Constructor Summary | |
---|---|
ServerTwoWaySocketFactory(int timeout)
Dla inicjacji połączenia do klienta będzie stosowany wskazany timeout. |
Method Summary | |
---|---|
void |
addRequestSocket(byte[] address,
java.net.Socket socket)
Add a request socket to the factory. |
java.net.ServerSocket |
createServerSocket(int port)
Returns a server socket for handling the two-way protocol. |
java.net.Socket |
createSocket(java.lang.String address,
int port)
Create a socket connectoin to the host of the given address
and port . |
Methods inherited from class java.rmi.server.RMISocketFactory |
---|
getDefaultSocketFactory, getFailureHandler, getSocketFactory, setFailureHandler, setSocketFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerTwoWaySocketFactory(int timeout)
timeout
- -
timeout łączenia z klientemMethod Detail |
---|
public void addRequestSocket(byte[] address, java.net.Socket socket) throws java.io.IOException
socket
to the factory. The factory will use
this socket
to request a callback socket from the host of
the given address
.
address
- Address of the clientsocket
- Socket on which to request callback sockets from the client.
java.io.IOException
public java.net.Socket createSocket(java.lang.String address, int port) throws java.io.IOException
address
and port
. If the address
is for a host
that has provided a callback socket request signalling channel, then that
channel is used to request that the client create the socket. Otherwise a
socket is created directly to the client from the server.
createSocket
in interface java.rmi.server.RMIClientSocketFactory
createSocket
in class java.rmi.server.RMISocketFactory
address
- Address for the socket.port
- Port for the socket.
java.io.IOException
public java.net.ServerSocket createServerSocket(int port) throws java.io.IOException
createServerSocket
in interface java.rmi.server.RMIServerSocketFactory
createServerSocket
in class java.rmi.server.RMISocketFactory
port
- Port on which the socket will listen.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |