|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.client.AbstractClientConnectionHandler
public abstract class AbstractClientConnectionHandler
Common abstract superclass for client connections to a server.
| Field Summary | |
|---|---|
protected String |
host
The name or IP address of the host the class server is running on. |
protected List<ClientConnectionStatusListener> |
listeners
List of status listeners for this connection. |
protected String |
name
The name given to this connection handler. |
protected JPPFClientConnection |
owner
The client connection which owns this connection handler. |
protected int |
port
The TCP port the class server is listening to. |
protected SocketWrapper |
socketClient
The socket client uses to communicate over a socket connection. |
protected SocketInitializer |
socketInitializer
Used to synchronize access to the underlying socket from multiple threads. |
protected AtomicReference<JPPFClientConnectionStatus> |
status
Status of the connection. |
| Constructor Summary | |
|---|---|
protected |
AbstractClientConnectionHandler(JPPFClientConnection owner)
Initialize this connection with the specified owner. |
| Method Summary | |
|---|---|
void |
addClientConnectionStatusListener(ClientConnectionStatusListener listener)
Add a connection status listener to this connection's list of listeners. |
protected abstract SocketInitializer |
createSocketInitializer()
Create a socket initializer for this connection handler. |
protected void |
fireStatusChanged(JPPFClientConnectionStatus oldStatus)
Notify all listeners that the status of this connection has changed. |
SocketWrapper |
getSocketClient()
Get the socket client used to communicate over a socket connection. |
JPPFClientConnectionStatus |
getStatus()
Get the status of this connection. |
void |
removeClientConnectionStatusListener(ClientConnectionStatusListener listener)
Remove a connection status listener from this connection's list of listeners. |
void |
setStatus(JPPFClientConnectionStatus newStatus)
Set the status of this connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jppf.client.ClientConnectionHandler |
|---|
close, init, initSocketClient |
| Field Detail |
|---|
protected SocketWrapper socketClient
protected SocketInitializer socketInitializer
protected String host
protected int port
protected JPPFClientConnection owner
protected String name
protected AtomicReference<JPPFClientConnectionStatus> status
protected List<ClientConnectionStatusListener> listeners
| Constructor Detail |
|---|
protected AbstractClientConnectionHandler(JPPFClientConnection owner)
owner - the client connection which owns this connection handler.| Method Detail |
|---|
public JPPFClientConnectionStatus getStatus()
getStatus in interface ClientConnectionStatusHandlerJPPFClientConnectionStatus enumerated value.ClientConnectionStatusHandler.getStatus()public void setStatus(JPPFClientConnectionStatus newStatus)
setStatus in interface ClientConnectionStatusHandlernewStatus - a JPPFClientConnectionStatus enumerated value.ClientConnectionStatusHandler.setStatus(org.jppf.client.JPPFClientConnectionStatus)public void addClientConnectionStatusListener(ClientConnectionStatusListener listener)
addClientConnectionStatusListener in interface ClientConnectionStatusHandlerlistener - the listener to add to the list.ClientConnectionStatusHandler.addClientConnectionStatusListener(org.jppf.client.event.ClientConnectionStatusListener)public void removeClientConnectionStatusListener(ClientConnectionStatusListener listener)
removeClientConnectionStatusListener in interface ClientConnectionStatusHandlerlistener - the listener to remove from the list.ClientConnectionStatusHandler.removeClientConnectionStatusListener(org.jppf.client.event.ClientConnectionStatusListener)protected abstract SocketInitializer createSocketInitializer()
SocketInitializer instance.protected void fireStatusChanged(JPPFClientConnectionStatus oldStatus)
oldStatus - the connection status before the change.
public SocketWrapper getSocketClient()
throws Exception
getSocketClient in interface ClientConnectionHandlerSocketWrapper instance.
Exception - if any error occurs.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||