|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ecf.provider.comm.tcp.SSLClient
public final class SSLClient
Field Summary | |
---|---|
protected long |
closeTimeout
|
protected ID |
containerID
|
static long |
DEFAULT_CLOSE_TIMEOUT
|
static int |
DEFAULT_MAX_BUFFER_MSG
|
static int |
DEFAULT_RCVR_PRIORITY
|
static int |
DEFAULT_SNDR_PRIORITY
|
static int |
DEFAULT_WAIT_INTERVAL
|
protected ISynchAsynchEventHandler |
handler
|
protected java.io.ObjectInputStream |
inputStream
|
protected boolean |
isClosing
|
protected int |
keepAlive
|
protected java.lang.Thread |
keepAliveThread
|
protected int |
maxMsg
|
protected java.io.ObjectOutputStream |
outputStream
|
protected java.lang.Object |
outputStreamLock
|
protected PingMessage |
ping
|
protected java.lang.Object |
pingLock
|
protected PingResponseMessage |
pingResp
|
protected java.util.Map |
properties
|
static java.lang.String |
PROTOCOL
|
protected SimpleFIFOQueue |
queue
|
protected java.lang.Thread |
rcvThread
|
protected java.lang.Thread |
sendThread
|
protected java.net.Socket |
socket
|
protected boolean |
waitForPing
|
Constructor Summary | |
---|---|
SSLClient(ISynchAsynchEventHandler handler,
int keepAlive)
|
|
SSLClient(java.net.Socket aSocket,
java.io.ObjectInputStream iStream,
java.io.ObjectOutputStream oStream,
ISynchAsynchEventHandler handler)
|
|
SSLClient(java.net.Socket aSocket,
java.io.ObjectInputStream iStream,
java.io.ObjectOutputStream oStream,
ISynchAsynchEventHandler handler,
int maxmsgs)
|
Method Summary | |
---|---|
void |
addListener(IConnectionListener l)
Add comm layer event listener |
java.lang.Object |
connect(ID remote,
java.lang.Object data,
int timeout)
Connect to a remote process |
protected void |
debug(java.lang.String msg)
|
void |
disconnect()
Disconnect |
java.lang.Object |
getAdapter(java.lang.Class clazz)
|
ID |
getLocalID()
Get local ID for this connection |
java.util.Map |
getProperties()
Get properties for this connection |
boolean |
isConnected()
|
boolean |
isStarted()
|
void |
queueObject(ID recipient,
java.io.Serializable obj)
|
void |
removeListener(IConnectionListener l)
remove comm layer event listener |
void |
sendAsynch(ID recipient,
byte[] obj)
Send data asynchronously. |
void |
sendAsynch(ID recipient,
java.lang.Object obj)
|
java.io.Serializable |
sendObject(ID recipient,
java.io.Serializable obj)
|
java.lang.Object |
sendSynch(ID rec,
byte[] obj)
Send data synchronously, blocking until a result is received |
java.lang.Object |
sendSynch(ID rec,
java.lang.Object obj)
|
void |
setCloseTimeout(long t)
|
void |
setProperties(java.util.Map props)
|
void |
start()
Start connection |
void |
stop()
Stop connection |
protected void |
traceStack(java.lang.String msg,
java.lang.Throwable e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROTOCOL
public static final int DEFAULT_SNDR_PRIORITY
public static final int DEFAULT_RCVR_PRIORITY
public static final long DEFAULT_CLOSE_TIMEOUT
public static final int DEFAULT_MAX_BUFFER_MSG
public static final int DEFAULT_WAIT_INTERVAL
protected java.net.Socket socket
protected java.io.ObjectOutputStream outputStream
protected java.io.ObjectInputStream inputStream
protected ISynchAsynchEventHandler handler
protected SimpleFIFOQueue queue
protected int keepAlive
protected java.lang.Thread sendThread
protected java.lang.Thread rcvThread
protected java.lang.Thread keepAliveThread
protected boolean isClosing
protected boolean waitForPing
protected PingMessage ping
protected PingResponseMessage pingResp
protected int maxMsg
protected long closeTimeout
protected java.util.Map properties
protected ID containerID
protected java.lang.Object pingLock
protected final java.lang.Object outputStreamLock
Constructor Detail |
---|
public SSLClient(java.net.Socket aSocket, java.io.ObjectInputStream iStream, java.io.ObjectOutputStream oStream, ISynchAsynchEventHandler handler) throws java.io.IOException
java.io.IOException
public SSLClient(java.net.Socket aSocket, java.io.ObjectInputStream iStream, java.io.ObjectOutputStream oStream, ISynchAsynchEventHandler handler, int maxmsgs) throws java.io.IOException
java.io.IOException
public SSLClient(ISynchAsynchEventHandler handler, int keepAlive)
Method Detail |
---|
public ID getLocalID()
IConnection
getLocalID
in interface IConnection
public void removeListener(IConnectionListener l)
IConnection
removeListener
in interface IConnection
l
- the listener to removepublic void addListener(IConnectionListener l)
IConnection
addListener
in interface IConnection
l
- the listener to addpublic boolean isConnected()
isConnected
in interface IConnection
public boolean isStarted()
isStarted
in interface IConnection
public java.lang.Object connect(ID remote, java.lang.Object data, int timeout) throws ECFException
IConnection
connect
in interface IConnection
remote
- the identity of the remote to connect to. Must not be null
.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
ECFException
- thrown if some problem with connectpublic void setCloseTimeout(long t)
public void start()
IConnection
start
in interface IConnection
public void stop()
IConnection
stop
in interface IConnection
public void disconnect()
IConnection
disconnect
in interface IConnection
public void sendAsynch(ID recipient, byte[] obj) throws java.io.IOException
IAsynchConnection
sendAsynch
in interface IAsynchConnection
recipient
- the ID of the intended receiverobj
- the data to send
java.io.IOException
- thrown if data cannot be sent (e.g. disconnected)public void sendAsynch(ID recipient, java.lang.Object obj) throws java.io.IOException
java.io.IOException
public void queueObject(ID recipient, java.io.Serializable obj) throws java.io.IOException
java.io.IOException
public java.io.Serializable sendObject(ID recipient, java.io.Serializable obj) throws java.io.IOException
java.io.IOException
public java.lang.Object sendSynch(ID rec, java.lang.Object obj) throws java.io.IOException
java.io.IOException
public java.lang.Object sendSynch(ID rec, byte[] obj) throws java.io.IOException
ISynchConnection
sendSynch
in interface ISynchConnection
rec
- the receiver to receive the synchronous requestobj
- the data to send
java.io.IOException
- thrown if sending cannot occur (e.g. not connected)public java.util.Map getProperties()
IConnection
getProperties
in interface IConnection
public java.lang.Object getAdapter(java.lang.Class clazz)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
protected void debug(java.lang.String msg)
protected void traceStack(java.lang.String msg, java.lang.Throwable e)
public void setProperties(java.util.Map props)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |