|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
One endpoint of a physical connection of arbitrary nature between two communicating parties. A IConnector
encapsulates the process of establishing and closing such connections and has a
location
of
CLIENT
or
SERVER
with respect to this process. Once a connection is
established either party can use its connector to open multiple IChannel
s to asynchronously exchange
IBuffer
s.
This interface is not intended to be implemented by clients. Providers of connectors for new physical connection types have to implement org.eclipse.internal.net4j.connector.InternalConnector.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.net4j.ILocationAware |
---|
ILocationAware.Location |
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer |
---|
IContainer.Modifiable<E> |
Field Summary | |
---|---|
static long |
NO_TIMEOUT
|
Fields inherited from interface org.eclipse.net4j.channel.IChannelMultiplexer |
---|
DEFAULT_OPEN_CHANNEL_TIMEOUT, NO_CHANNEL_TIMEOUT |
Method Summary | |
---|---|
void |
connect()
Synchronous connect with infinite timeout value. |
void |
connect(long timeout)
Synchronous connect. |
void |
connectAsync()
Asynchronous connect. |
ConnectorState |
getState()
Returns the current state of this connector. |
String |
getURL()
|
boolean |
isConnected()
Same as . |
void |
waitForConnection(long timeout)
Blocks until or the given timeout expired. |
Methods inherited from interface org.eclipse.net4j.channel.IChannelMultiplexer |
---|
getChannels, getOpenChannelTimeout, openChannel, openChannel, openChannel, setOpenChannelTimeout |
Methods inherited from interface org.eclipse.net4j.ILocationAware |
---|
getLocation, isClient, isServer |
Methods inherited from interface org.eclipse.net4j.util.container.IContainer |
---|
getElements, isEmpty |
Methods inherited from interface org.eclipse.net4j.util.event.INotifier |
---|
addListener, getListeners, hasListeners, removeListener |
Methods inherited from interface org.eclipse.net4j.util.security.IUserAware |
---|
getUserID |
Methods inherited from interface org.eclipse.net4j.util.collection.Closeable |
---|
close, isClosed |
Field Detail |
---|
static final long NO_TIMEOUT
Method Detail |
---|
String getURL()
ConnectorState getState()
boolean isConnected()
getState()
== ConnectorState.CONNECTED
.
void connect() throws ConnectorException
connect(NO_TIMEOUT)
.
ConnectorException
void connect(long timeout) throws ConnectorException
isConnected()
== true
or the given timeout expired.
timeout
- The maximum number of milli seconds to block or NO_TIMEOUT
to block indefinetely in case no
connection occurs.
ConnectorException
void connectAsync() throws ConnectorException
IConnector
in a state where isConnected()
== false
.
ConnectorException
waitForConnection(long)
,
connect(long)
void waitForConnection(long timeout) throws ConnectorException
isConnected()
== true
or the given timeout expired.
timeout
- The maximum number of milli seconds to block or NO_TIMEOUT
to block indefinetely in case no
connection occurs.
ConnectorException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |