Class SSLClient
java.lang.Object
org.eclipse.ecf.provider.comm.tcp.SSLClient
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable,IAsynchConnection,IConnection,ISynchAsynchConnection,ISynchConnection
- Since:
- 4.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected IDstatic final longstatic final intstatic final intstatic final intstatic final intprotected ISynchAsynchEventHandlerprotected ObjectInputStreamprotected booleanprotected intprotected Threadprotected ObjectOutputStreamprotected final Objectprotected PingMessageprotected Objectprotected PingResponseMessageprotected Mapstatic final Stringprotected SimpleFIFOQueueprotected Threadprotected Threadprotected Socketprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionSSLClient(Socket aSocket, ObjectInputStream iStream, ObjectOutputStream oStream, ISynchAsynchEventHandler handler) SSLClient(Socket aSocket, ObjectInputStream iStream, ObjectOutputStream oStream, ISynchAsynchEventHandler handler, int maxmsgs) SSLClient(ISynchAsynchEventHandler handler, int keepAlive) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd comm layer event listenerConnect to a remote processprotected voidvoidDisconnectgetAdapter(Class clazz) Get local ID for this connectionGet properties for this connectionbooleanbooleanvoidqueueObject(ID recipient, Serializable obj) voidremove comm layer event listenervoidsendAsynch(ID recipient, byte[] obj) Send data asynchronously.voidsendAsynch(ID recipient, Object obj) sendObject(ID recipient, Serializable obj) Send data synchronously, blocking until a result is receivedvoidsetCloseTimeout(long t) voidsetProperties(Map props) voidstart()Start connectionvoidstop()Stop connectionprotected voidtraceStack(String msg, Throwable e)
-
Field Details
-
PROTOCOL
- See Also:
-
DEFAULT_SNDR_PRIORITY
public static final int DEFAULT_SNDR_PRIORITY- See Also:
-
DEFAULT_RCVR_PRIORITY
public static final int DEFAULT_RCVR_PRIORITY- See Also:
-
DEFAULT_CLOSE_TIMEOUT
public static final long DEFAULT_CLOSE_TIMEOUT- See Also:
-
DEFAULT_MAX_BUFFER_MSG
public static final int DEFAULT_MAX_BUFFER_MSG- See Also:
-
DEFAULT_WAIT_INTERVAL
public static final int DEFAULT_WAIT_INTERVAL- See Also:
-
socket
-
outputStream
-
inputStream
-
handler
-
queue
-
keepAlive
protected int keepAlive -
sendThread
-
rcvThread
-
keepAliveThread
-
isClosing
protected boolean isClosing -
waitForPing
protected boolean waitForPing -
ping
-
pingResp
-
closeTimeout
protected long closeTimeout -
properties
-
containerID
-
pingLock
-
outputStreamLock
-
-
Constructor Details
-
SSLClient
public SSLClient(Socket aSocket, ObjectInputStream iStream, ObjectOutputStream oStream, ISynchAsynchEventHandler handler) throws IOException - Throws:
IOException
-
SSLClient
public SSLClient(Socket aSocket, ObjectInputStream iStream, ObjectOutputStream oStream, ISynchAsynchEventHandler handler, int maxmsgs) throws IOException - Throws:
IOException
-
SSLClient
-
-
Method Details
-
getLocalID
Description copied from interface:IConnectionGet local ID for this connection- Specified by:
getLocalIDin interfaceIConnection- Returns:
- ID associated with local instance
-
removeListener
Description copied from interface:IConnectionremove comm layer event listener- Specified by:
removeListenerin interfaceIConnection- Parameters:
l- the listener to remove
-
addListener
Description copied from interface:IConnectionAdd comm layer event listener- Specified by:
addListenerin interfaceIConnection- Parameters:
l- the listener to add
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceIConnection- Returns:
- true if the implementing class has been previously connected, false if not connected
-
isStarted
public boolean isStarted()- Specified by:
isStartedin interfaceIConnection- Returns:
- true if connection is started, false otherwise
-
connect
Description copied from interface:IConnectionConnect to a remote process- Specified by:
connectin interfaceIConnection- Parameters:
remote- the identity of the remote to connect to. Must not benull.data- any data to send with the connection request (e.g. password or other authentication data)timeout- the timeout (in ms) for the connection to occur- Returns:
- a result object that is of type specific to provider implementation
- Throws:
ECFException- thrown if some problem with connect
-
setCloseTimeout
public void setCloseTimeout(long t) -
start
public void start()Description copied from interface:IConnectionStart connection- Specified by:
startin interfaceIConnection
-
stop
public void stop()Description copied from interface:IConnectionStop connection- Specified by:
stopin interfaceIConnection
-
disconnect
public void disconnect()Description copied from interface:IConnectionDisconnect- Specified by:
disconnectin interfaceIConnection
-
sendAsynch
Description copied from interface:IAsynchConnectionSend data asynchronously. Implementing classes should not block on sending the given data and return immediately.- Specified by:
sendAsynchin interfaceIAsynchConnection- Parameters:
recipient- the ID of the intended receiverobj- the data to send- Throws:
IOException- thrown if data cannot be sent (e.g. disconnected)
-
sendAsynch
- Throws:
IOException
-
queueObject
- Throws:
IOException
-
sendObject
- Throws:
IOException
-
sendSynch
- Throws:
IOException
-
sendSynch
Description copied from interface:ISynchConnectionSend data synchronously, blocking until a result is received- Specified by:
sendSynchin interfaceISynchConnection- Parameters:
rec- the receiver to receive the synchronous requestobj- the data to send- Returns:
- the data received. The return type will be specific to the provider implementation.
- Throws:
IOException- thrown if sending cannot occur (e.g. not connected)
-
getProperties
Description copied from interface:IConnectionGet properties for this connection- Specified by:
getPropertiesin interfaceIConnection- Returns:
- Map the properties associated with this connection. May be null.
-
getAdapter
- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable
-
debug
-
traceStack
-
setProperties
-