Package org.eclipse.net4j.connector
Interface IConnector
- 
- All Superinterfaces:
- org.eclipse.net4j.util.collection.Closeable,- IChannelMultiplexer,- org.eclipse.net4j.util.container.IContainer<IChannel>,- ILocationAware,- org.eclipse.net4j.util.event.INotifier,- org.eclipse.net4j.util.properties.IPropertiesContainer,- org.eclipse.net4j.util.security.IUserAware
 - All Known Subinterfaces:
- IJVMConnector,- InternalConnector,- IServerConnector,- ITCPConnector,- IWSConnector
 - All Known Implementing Classes:
- Connector
 
 public interface IConnector extends IChannelMultiplexer, org.eclipse.net4j.util.security.IUserAware, org.eclipse.net4j.util.collection.Closeable One endpoint of a physical connection of arbitrary nature between two communicating parties. AIConnectorencapsulates the process of establishing and closing such connections and has alocationofCLIENTorSERVERwith respect to this process. Once a connection is established either party can use its connector to open multipleIChannels to asynchronously exchangeIBuffers.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. - Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainerorg.eclipse.net4j.util.container.IContainer.Modifiable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends java.lang.Object>
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.ILocationAwareILocationAware.Location
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static longNO_TIMEOUT- 
Fields inherited from interface org.eclipse.net4j.channel.IChannelMultiplexerDEFAULT_OPEN_CHANNEL_TIMEOUT, NO_CHANNEL_TIMEOUT
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnect()Synchronous connect with infinite timeout value.voidconnect(long timeout)Synchronous connect.voidconnectAsync()Asynchronous connect.ConnectorStategetState()Returns the current state of this connector.java.lang.StringgetURL()booleanisConnected()Same asgetState()==ConnectorState.CONNECTEDvoidwaitForConnection(long timeout)Blocks untilisConnected()== true- 
Methods inherited from interface org.eclipse.net4j.channel.IChannelMultiplexergetChannels, getOpenChannelTimeout, openChannel, openChannel, openChannel, setOpenChannelTimeout
 - 
Methods inherited from interface org.eclipse.net4j.ILocationAwaregetLocation, isClient, isServer
 
- 
 
- 
- 
- 
Field Detail- 
NO_TIMEOUTstatic final long NO_TIMEOUT - Since:
- 2.0
- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getURLjava.lang.String getURL() 
 - 
getStateConnectorState getState() Returns the current state of this connector.
 - 
isConnectedboolean isConnected() Same asgetState()==ConnectorState.CONNECTED
 - 
connectvoid connect() throws ConnectorExceptionSynchronous connect with infinite timeout value. Same asconnect(NO_TIMEOUT).- Throws:
- ConnectorException
- Since:
- 4.0
 
 - 
connectvoid connect(long timeout) throws ConnectorExceptionSynchronous connect. Blocks untilisConnected()== true- Parameters:
- timeout- The maximum number of milli seconds to block or- NO_TIMEOUTto block indefinetely in case no connection occurs.
- Throws:
- ConnectorException
- Since:
- 4.0
 
 - 
connectAsyncvoid connectAsync() throws ConnectorExceptionAsynchronous connect. May leave thisIConnectorin a state whereisConnected()== false- Throws:
- ConnectorException
- See Also:
- waitForConnection(long),- connect(long)
 
 - 
waitForConnectionvoid waitForConnection(long timeout) throws ConnectorExceptionBlocks untilisConnected()== true- Parameters:
- timeout- The maximum number of milli seconds to block or- NO_TIMEOUTto block indefinetely in case no connection occurs.
- Throws:
- ConnectorException
- Since:
- 4.0
 
 
- 
 
-