summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java')
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java
index de9bdc4..8336bb6 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java
@@ -10,11 +10,19 @@
**************************************************************************/
package org.eclipse.internal.net4j.transport;
+import static org.eclipse.net4j.transport.Connector.State.CONNECTED;
+import static org.eclipse.net4j.transport.Connector.State.CONNECTING;
+import static org.eclipse.net4j.transport.Connector.State.DISCONNECTED;
+import static org.eclipse.net4j.transport.Connector.State.NEGOTIATING;
+import static org.eclipse.net4j.transport.Connector.Type.CLIENT;
+import static org.eclipse.net4j.transport.Connector.Type.SERVER;
+
import org.eclipse.net4j.transport.Buffer;
import org.eclipse.net4j.transport.BufferProvider;
import org.eclipse.net4j.transport.Channel;
import org.eclipse.net4j.transport.Connector;
import org.eclipse.net4j.transport.ConnectorCredentials;
+import org.eclipse.net4j.transport.ConnectorDescription;
import org.eclipse.net4j.transport.ConnectorException;
import org.eclipse.net4j.transport.Protocol;
import org.eclipse.net4j.transport.ProtocolFactory;
@@ -39,7 +47,8 @@ import java.util.concurrent.TimeUnit;
/**
* @author Eike Stepper
*/
-public abstract class AbstractConnector extends AbstractLifecycle implements Connector, BufferProvider
+public abstract class AbstractConnector<DESCRIPTION extends ConnectorDescription> extends AbstractLifecycle implements
+ Connector<DESCRIPTION>, BufferProvider
{
private static final ContextTracer TRACER = new ContextTracer(Net4j.DEBUG_CONNECTOR, AbstractConnector.class);
@@ -60,6 +69,8 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
private int connectorID = getNextConnectorID();
+ private DESCRIPTION description;
+
private ConnectorCredentials credentials;
private IRegistry<String, ProtocolFactory> protocolFactoryRegistry;
@@ -187,6 +198,16 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
return getType() == Type.SERVER;
}
+ public DESCRIPTION getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(DESCRIPTION description)
+ {
+ this.description = description;
+ }
+
public ConnectorCredentials getCredentials()
{
return credentials;