Package org.eclipse.ecf.provider.generic
Class ServerSOContainer
- java.lang.Object
- 
- org.eclipse.ecf.core.AbstractContainer
- 
- org.eclipse.ecf.provider.generic.SOContainer
- 
- org.eclipse.ecf.provider.generic.ServerSOContainer
 
 
 
- 
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable,- IContainer,- IIdentifiable,- IReliableContainer,- ISharedObjectContainer,- ISharedObjectContainerGroupManager
 - Direct Known Subclasses:
- ServletServerContainer,- SSLServerSOContainer,- TCPServerSOContainer
 
 public class ServerSOContainer extends SOContainer implements ISharedObjectContainerGroupManager 
- 
- 
Field SummaryFields Modifier and Type Field Description protected IConnectHandlerPolicyconnectHandlerPolicy- 
Fields inherited from class org.eclipse.ecf.provider.generic.SOContainerconfig, DEFAULT_OBJECT_ARG_KEY, DEFAULT_OBJECT_ARGTYPES_KEY, groupManager, isClosing, loadingThreadGroup, policy, receiver, sharedObjectManager, sharedObjectMessageSerializer, sharedObjectThreadGroup
 
- 
 - 
Constructor SummaryConstructors Constructor Description ServerSOContainer(ISharedObjectContainerConfig config)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ContainerMessageacceptNewClient(Socket socket, String target, Serializable data, ISynchAsynchConnection conn)protected ObjectcheckJoin(SocketAddress saddr, ID fromID, String target, Serializable data)voidconnect(ID groupID, IConnectContext joinContext)Connect to a target remote process or process group.voiddisconnect()Disconnect.voiddispose()Dispose this IContainer instance.voidejectAllGroupMembers(Serializable reason)Eject all, for the given reason.voidejectGroupMember(ID memberID, Serializable reason)Eject the given groupMemberID from the current group of containers, for the given reason.protected voidforwardExcluding(ID from, ID excluding, ContainerMessage data)protected voidforwardToRemote(ID from, ID to, ContainerMessage data)IDgetConnectedID()Get the target ID that this container instance has connected to.protected IAsynchConnectiongetConnectionForID(ID memberID)protected IDgetIDForConnection(IAsynchConnection conn)protected ISynchConnectiongetSynchConnectionForID(ID memberID)protected voidhandleLeaveGroupMessage(ContainerMessage mess)protected voidhandleViewChangeMessage(ContainerMessage mess)booleanisGroupManager()protected voidprocessDisconnect(DisconnectEvent e)protected voidqueueContainerMessage(ContainerMessage message)voidsetConnectPolicy(IConnectHandlerPolicy policy)Set the join policy for this group manager.- 
Methods inherited from class org.eclipse.ecf.provider.generic.SOContaineraddNewRemoteMember, 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, getMessageReceiver, 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.AbstractContaineraddListener, fireContainerEvent, getPasswordFromConnectContext, removeListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.ecf.core.IContaineraddListener, removeListener
 
- 
 
- 
- 
- 
Field Detail- 
connectHandlerPolicyprotected IConnectHandlerPolicy connectHandlerPolicy 
 
- 
 - 
Constructor Detail- 
ServerSOContainerpublic ServerSOContainer(ISharedObjectContainerConfig config) 
 
- 
 - 
Method Detail- 
isGroupManagerpublic boolean isGroupManager() - Specified by:
- isGroupManagerin interface- IReliableContainer
- Specified by:
- isGroupManagerin class- SOContainer
- Returns:
- true if this IReliableContainer instance is in the 'manager' role for the group, false otherwise.
 
 - 
getConnectedIDpublic ID getConnectedID() Description copied from interface:IContainerGet the target ID that this container instance has connected to. Returns null if not connected.- Specified by:
- getConnectedIDin interface- IContainer
- Specified by:
- getConnectedIDin class- SOContainer
- Returns:
- ID of the target we are connected to. Returns nullif container not connected.
 
 - 
disconnectpublic void disconnect() Description copied from interface:IContainerDisconnect. This operation will disconnect the local container instance from any previously joined target or group. Subsequent calls to getConnectedID() will returnnull.- Specified by:
- disconnectin interface- IContainer
- Specified by:
- disconnectin class- SOContainer
 
 - 
ejectGroupMemberpublic void ejectGroupMember(ID memberID, Serializable reason) Description copied from interface:ISharedObjectContainerGroupManagerEject the given groupMemberID from the current group of containers, for the given reason.- Specified by:
- ejectGroupMemberin interface- ISharedObjectContainerGroupManager
- Parameters:
- memberID- the ID of the group member to eject. If null, or if group member is not in group managed by this object, the method has no effect
- reason- a reason for the ejection
 
 - 
ejectAllGroupMemberspublic void ejectAllGroupMembers(Serializable reason) Description copied from interface:ISharedObjectContainerGroupManagerEject all, for the given reason.- Specified by:
- ejectAllGroupMembersin interface- ISharedObjectContainerGroupManager
- Parameters:
- reason- a reason for the ejection
 
 - 
disposepublic void dispose() Description copied from interface:IContainerDispose 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:
- disposein interface- IContainer
- Overrides:
- disposein class- SOContainer
 
 - 
connectpublic void connect(ID groupID, IConnectContext joinContext) throws ContainerConnectException Description copied from interface:IContainerConnect to a target remote process or process group. The target identified by the first parameter (targetID) is connected the implementation class. If authentication information is required, the required information is given via via the second parameter (connectContext). Callers note that depending upon the provider implementation this method may block. It is suggested that callers use a separate thread to call this method. This method provides an implementation independent way for container implementations to connect, authenticate, and communicate with a remote service or group of services. Providers are responsible for implementing this operation in a way appropriate to the given remote service (or group) via expected protocol.- Specified by:
- connectin interface- IContainer
- Specified by:
- connectin class- SOContainer
- Parameters:
- groupID- the ID of the remote server or group to connect to. See- IContainer.getConnectNamespace()for a explanation of the constraints upon this parameter.
- joinContext- any required context to allow this container to authenticate. May be- nullif underlying provider does not have any authentication requirements for connection.
- Throws:
- ContainerConnectException- thrown if communication cannot be established with remote service. Causes can include network connection failure, authentication failure, server error, or if container is already connected.
 
 - 
setConnectPolicypublic void setConnectPolicy(IConnectHandlerPolicy policy) Description copied from interface:ISharedObjectContainerGroupManagerSet the join policy for this group manager. If the policy is set to null, the implementing container is not obligated to consult the policy. If non-null, the given policy's checkJoin method is called before the manager agrees to the join of a given group participant.- Specified by:
- setConnectPolicyin interface- ISharedObjectContainerGroupManager
 
 - 
queueContainerMessageprotected void queueContainerMessage(ContainerMessage message) throws IOException - Specified by:
- queueContainerMessagein class- SOContainer
- Throws:
- IOException
 
 - 
forwardToRemoteprotected void forwardToRemote(ID from, ID to, ContainerMessage data) throws IOException - Specified by:
- forwardToRemotein class- SOContainer
- Throws:
- IOException
 
 - 
forwardExcludingprotected void forwardExcluding(ID from, ID excluding, ContainerMessage data) throws IOException - Specified by:
- forwardExcludingin class- SOContainer
- Throws:
- IOException
 
 - 
handleViewChangeMessageprotected void handleViewChangeMessage(ContainerMessage mess) throws IOException - Specified by:
- handleViewChangeMessagein class- SOContainer
- Parameters:
- mess- message
- Throws:
- IOException- not thrown by this implementation.
 
 - 
acceptNewClientprotected ContainerMessage acceptNewClient(Socket socket, String target, Serializable data, ISynchAsynchConnection conn) 
 - 
checkJoinprotected Object checkJoin(SocketAddress saddr, ID fromID, String target, Serializable data) throws Exception - Throws:
- Exception
 
 - 
handleLeaveGroupMessageprotected void handleLeaveGroupMessage(ContainerMessage mess) - Specified by:
- handleLeaveGroupMessagein class- SOContainer
- Parameters:
- mess- leave group message
 
 - 
getIDForConnectionprotected ID getIDForConnection(IAsynchConnection conn) - Specified by:
- getIDForConnectionin class- SOContainer
 
 - 
getConnectionForIDprotected IAsynchConnection getConnectionForID(ID memberID) 
 - 
getSynchConnectionForIDprotected ISynchConnection getSynchConnectionForID(ID memberID) 
 - 
processDisconnectprotected void processDisconnect(DisconnectEvent e) - Specified by:
- processDisconnectin class- SOContainer
 
 
- 
 
-