org.eclipse.ecf.provider.generic
Class TCPServerSOContainer

java.lang.Object
  extended by org.eclipse.ecf.core.AbstractContainer
      extended by org.eclipse.ecf.provider.generic.SOContainer
          extended by org.eclipse.ecf.provider.generic.ServerSOContainer
              extended by org.eclipse.ecf.provider.generic.TCPServerSOContainer
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IContainer, IIdentifiable, IReliableContainer, ISharedObjectContainer, ISharedObjectContainerGroupManager, IConnectRequestHandler
Direct Known Subclasses:
GenericServerContainer

public class TCPServerSOContainer
extends ServerSOContainer
implements IConnectRequestHandler


Field Summary
static java.lang.String DEFAULT_HOST
           
static int DEFAULT_KEEPALIVE
           
static java.lang.String DEFAULT_NAME
           
static int DEFAULT_PORT
           
static java.lang.String DEFAULT_PROTOCOL
           
protected  TCPServerSOContainerGroup group
           
protected  boolean isSingle
           
protected  int keepAlive
           
 
Fields inherited from class org.eclipse.ecf.provider.generic.ServerSOContainer
connectHandlerPolicy
 
Fields inherited from class org.eclipse.ecf.provider.generic.SOContainer
config, DEFAULT_OBJECT_ARG_KEY, DEFAULT_OBJECT_ARGTYPES_KEY, groupManager, isClosing, loadingThreadGroup, policy, receiver, sharedObjectManager, sharedObjectMessageSerializer, sharedObjectThreadGroup
 
Constructor Summary
TCPServerSOContainer(ISharedObjectContainerConfig config)
           
TCPServerSOContainer(ISharedObjectContainerConfig config, int keepAlive)
           
TCPServerSOContainer(ISharedObjectContainerConfig config, TCPServerSOContainerGroup grp, int keepAlive)
           
TCPServerSOContainer(ISharedObjectContainerConfig config, TCPServerSOContainerGroup listener, java.lang.String path, int keepAlive)
           
 
Method Summary
 void dispose()
          Dispose this IContainer instance.
protected  java.io.Serializable getConnectDataFromInput(java.io.Serializable input)
           
static java.lang.String getDefaultServerURL()
           
protected  int getKeepAlive()
           
static java.lang.String getServerURL(java.lang.String host, java.lang.String name)
           
 java.io.Serializable handleConnectRequest(java.net.Socket socket, java.lang.String target, java.io.Serializable data, ISynchAsynchConnection conn)
          Handle a connect request from remote client
protected  void initialize(TCPServerSOContainerGroup listener, java.lang.String path, int ka)
           
 
Methods inherited from class org.eclipse.ecf.provider.generic.ServerSOContainer
acceptNewClient, checkJoin, connect, disconnect, ejectAllGroupMembers, ejectGroupMember, forwardExcluding, forwardToRemote, getConnectedID, getConnectionForID, getIDForConnection, getSynchConnectionForID, handleLeaveGroupMessage, handleViewChangeMessage, isGroupManager, processDisconnect, queueContainerMessage, setConnectPolicy
 
Methods inherited from class org.eclipse.ecf.provider.generic.SOContainer
addNewRemoteMember, addSharedObject0, addSharedObjectAndWait, addSharedObjectWrapper, addToLoading, checkRemoteCreate, createContainerPropertiesForSharedObject, createRemoteSharedObjectConfig, createRemoteSharedObjectContext, createRemoteSharedObjectWrapper, createSharedObjectConfig, createSharedObjectContext, createSharedObjectWrapper, debug, defaultDeserializeSharedObjectMessage, defaultSerializeSharedObjectMessage, deserializeContainerMessage, deserializeSharedObjectMessage, destroySharedObject, disconnect, fireDelegateContainerEvent, forward, getAdapter, getArgsFromProperties, getArgTypesFromProperties, getClassLoaderForContainer, getClassLoaderForSharedObject, getConfig, getConnectNamespace, getGroupMemberIDs, getGroupMembershipLock, getID, getMaxGroupMembers, getNewSharedObjectThread, getNextSequenceNumber, getOtherMemberIDs, getReceiver, getSharedObject, getSharedObjectIDs, getSharedObjectManager, getSharedObjectMessageSerializer, getSharedObjectWrapper, handleAsynchIOException, handleCreateMessage, handleCreateResponseMessage, handleLeave, handleSharedObjectDisposeMessage, handleSharedObjectMessage, handleUndeliveredSharedObjectMessage, handleUnidentifiedMessage, isClosing, load, moveFromLoadingToActive, notifySharedObjectActivated, notifySharedObjectDeactivated, printToSystemError, processAsynch, processSynch, removeFromLoading, removeRemoteMember, removeSharedObject, sendCreate, sendCreateResponse, sendCreateResponseSharedObjectMessage, sendCreateSharedObjectMessage, sendDispose, sendDisposeSharedObjectMessage, sendMessage, sendMessage, sendSharedObjectMessage, serialize, serializeSharedObjectMessage, setMaxGroupMembers, setRemoteAddPolicy, setSharedObjectMessageSerializer, traceStack, validateContainerMessage, verifySharedObjectMessageTarget, verifyToIDForSharedObjectMessage
 
Methods inherited from class org.eclipse.ecf.core.AbstractContainer
addListener, fireContainerEvent, getPasswordFromConnectContext, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ecf.core.IContainer
addListener, removeListener
 

Field Detail

DEFAULT_PROTOCOL

public static final java.lang.String DEFAULT_PROTOCOL

DEFAULT_PORT

public static final int DEFAULT_PORT

DEFAULT_KEEPALIVE

public static final int DEFAULT_KEEPALIVE

DEFAULT_NAME

public static final java.lang.String DEFAULT_NAME

DEFAULT_HOST

public static java.lang.String DEFAULT_HOST

keepAlive

protected int keepAlive

group

protected TCPServerSOContainerGroup group

isSingle

protected boolean isSingle
Constructor Detail

TCPServerSOContainer

public TCPServerSOContainer(ISharedObjectContainerConfig config,
                            TCPServerSOContainerGroup grp,
                            int keepAlive)
                     throws java.io.IOException,
                            java.net.URISyntaxException
Throws:
java.io.IOException
java.net.URISyntaxException

TCPServerSOContainer

public TCPServerSOContainer(ISharedObjectContainerConfig config,
                            TCPServerSOContainerGroup listener,
                            java.lang.String path,
                            int keepAlive)

TCPServerSOContainer

public TCPServerSOContainer(ISharedObjectContainerConfig config)
                     throws java.io.IOException,
                            java.net.URISyntaxException
Throws:
java.io.IOException
java.net.URISyntaxException

TCPServerSOContainer

public TCPServerSOContainer(ISharedObjectContainerConfig config,
                            int keepAlive)
                     throws java.io.IOException,
                            java.net.URISyntaxException
Throws:
java.io.IOException
java.net.URISyntaxException
Method Detail

getKeepAlive

protected int getKeepAlive()

getServerURL

public static java.lang.String getServerURL(java.lang.String host,
                                            java.lang.String name)

getDefaultServerURL

public static java.lang.String getDefaultServerURL()

initialize

protected void initialize(TCPServerSOContainerGroup listener,
                          java.lang.String path,
                          int ka)

dispose

public void dispose()
Description copied from interface: IContainer
Dispose this IContainer instance. The container instance will be made inactive after the completion of this method and will be unavailable for subsequent usage.

Specified by:
dispose in interface IContainer
Overrides:
dispose in class ServerSOContainer

handleConnectRequest

public java.io.Serializable handleConnectRequest(java.net.Socket socket,
                                                 java.lang.String target,
                                                 java.io.Serializable data,
                                                 ISynchAsynchConnection conn)
Description copied from interface: IConnectRequestHandler
Handle a connect request from remote client

Specified by:
handleConnectRequest in interface IConnectRequestHandler
Parameters:
socket - the Socket that the request came in on
target - the target that the request is intended for
data - any data that was sent along with request (e.g. password or other authentication data)
conn - the connection instance that received the request
Returns:
any data intended as a response. If null is returned, this typically means refusal of connect request

getConnectDataFromInput

protected java.io.Serializable getConnectDataFromInput(java.io.Serializable input)
                                                throws java.lang.Exception
Throws:
java.lang.Exception