Package org.eclipse.ecf.provider.generic
Class ClientSOContainer
- java.lang.Object
- 
- org.eclipse.ecf.core.AbstractContainer
- 
- org.eclipse.ecf.provider.generic.SOContainer
- 
- org.eclipse.ecf.provider.generic.ClientSOContainer
 
 
 
- 
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable,- IContainer,- IIdentifiable,- IReliableContainer,- ISharedObjectContainer,- ISharedObjectContainerClient
 - Direct Known Subclasses:
- SSLClientSOContainer,- TCPClientSOContainer
 
 public abstract class ClientSOContainer extends SOContainer implements ISharedObjectContainerClient 
- 
- 
Field SummaryFields Modifier and Type Field Description static byteCONNECTEDstatic byteCONNECTINGprotected ISynchAsynchConnectionconnectionprotected byteconnectionStateprotected org.eclipse.ecf.provider.generic.ClientSOContainer.LockconnectLockprotected IConnectInitiatorPolicyconnectPolicystatic intDEFAULT_CONNECT_TIMEOUTstatic byteDISCONNECTEDprotected IDremoteServerID- 
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 ClientSOContainer(ISharedObjectContainerConfig config)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidconnect(ID targetID, IConnectContext joinContext)Connect to a target remote process or process group.protected Callback[]createAuthorizationCallbacks()protected abstract ISynchAsynchConnectioncreateConnection(ID targetID, Object data)Create connection instance.voiddisconnect()Disconnect.protected voiddisconnect(Throwable exception)voiddispose()Dispose this IContainer instance.protected voidforwardExcluding(ID from, ID excluding, byte msg, Serializable data)protected voidforwardExcluding(ID from, ID excluding, ContainerMessage data)protected voidforwardToRemote(ID from, ID to, ContainerMessage message)protected ObjectgetConnectData(ID remote, IConnectContext joinContext)IDgetConnectedID()Get the target ID that this container instance has connected to.protected ISynchAsynchConnectiongetConnection()protected org.eclipse.ecf.provider.generic.ClientSOContainer.LockgetConnectLock()protected intgetConnectTimeout()protected IDgetIDForConnection(IAsynchConnection conn)protected SerializablegetLeaveData(ID target)protected IDhandleConnectResponse(ID orginalTarget, Object serverData)protected voidhandleLeave(ID fromID, IConnection conn)protected voidhandleLeaveGroupMessage(ContainerMessage mess)protected voidhandleViewChangeMessage(ContainerMessage mess)protected booleanisConnected()protected booleanisConnecting()booleanisGroupManager()protected voidprocessAsynch(AsynchEvent evt)protected voidprocessDisconnect(DisconnectEvent evt)protected SerializableprocessSynch(SynchEvent evt)protected voidqueueContainerMessage(ContainerMessage message)protected voidsendCreate(ID sharedObjectId, ID toContainerId, SharedObjectDescription sd)protected ID[]sendCreateMsg(ID toID, SharedObjectDescription createInfo)protected voidsendCreateResponse(ID homeId, ID sharedObjectId, Throwable t, long identifier)protected voidsendCreateResponseSharedObjectMessage(ID toContainerId, ID fromSharedObject, Throwable t, long ident)protected ID[]sendCreateSharedObjectMessage(ID toContainerId, SharedObjectDescription sd)protected voidsendDispose(ID toContainerId, ID sharedObjectId)protected voidsendDisposeSharedObjectMessage(ID toContainerId, ID fromSharedObject)protected voidsendMessage(ID toContainerId, ID sharedObjectId, Object message)protected voidsendMessage(ContainerMessage data)protected voidsendSharedObjectMessage(ID toContainerId, ID fromSharedObject, Serializable data)voidsetConnectInitiatorPolicy(IConnectInitiatorPolicy policy)Set the connect initiator policy handler for authentication policy- 
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, handleSharedObjectDisposeMessage, handleSharedObjectMessage, handleUndeliveredSharedObjectMessage, handleUnidentifiedMessage, isClosing, load, moveFromLoadingToActive, notifySharedObjectActivated, notifySharedObjectDeactivated, printToSystemError, removeFromLoading, removeRemoteMember, removeSharedObject, 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- 
DEFAULT_CONNECT_TIMEOUTpublic static final int DEFAULT_CONNECT_TIMEOUT - See Also:
- Constant Field Values
 
 - 
connectionprotected ISynchAsynchConnection connection 
 - 
remoteServerIDprotected ID remoteServerID 
 - 
connectionStateprotected byte connectionState 
 - 
connectPolicyprotected IConnectInitiatorPolicy connectPolicy 
 - 
DISCONNECTEDpublic static final byte DISCONNECTED - See Also:
- Constant Field Values
 
 - 
CONNECTINGpublic static final byte CONNECTING - See Also:
- Constant Field Values
 
 - 
CONNECTEDpublic static final byte CONNECTED - See Also:
- Constant Field Values
 
 - 
connectLockprotected org.eclipse.ecf.provider.generic.ClientSOContainer.Lock connectLock 
 
- 
 - 
Constructor Detail- 
ClientSOContainerpublic ClientSOContainer(ISharedObjectContainerConfig config) 
 
- 
 - 
Method Detail- 
getConnectLockprotected org.eclipse.ecf.provider.generic.ClientSOContainer.Lock getConnectLock() 
 - 
getConnectionprotected ISynchAsynchConnection getConnection() 
 - 
setConnectInitiatorPolicypublic void setConnectInitiatorPolicy(IConnectInitiatorPolicy policy) Description copied from interface:ISharedObjectContainerClientSet the connect initiator policy handler for authentication policy- Specified by:
- setConnectInitiatorPolicyin interface- ISharedObjectContainerClient
- Parameters:
- policy- the policy to use
 
 - 
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
 
 - 
isGroupManagerpublic final 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.
 
 - 
connectpublic void connect(ID targetID, 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:
- targetID- 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.
 
 - 
createAuthorizationCallbacksprotected Callback[] createAuthorizationCallbacks() 
 - 
getConnectDataprotected Object getConnectData(ID remote, IConnectContext joinContext) throws IOException, UnsupportedCallbackException 
 - 
getConnectTimeoutprotected int getConnectTimeout() 
 - 
handleLeaveGroupMessageprotected void handleLeaveGroupMessage(ContainerMessage mess) - Specified by:
- handleLeaveGroupMessagein class- SOContainer
- Parameters:
- mess- leave group message
 
 - 
handleViewChangeMessageprotected void handleViewChangeMessage(ContainerMessage mess) throws IOException - Specified by:
- handleViewChangeMessagein class- SOContainer
- Throws:
- IOException
 
 - 
forwardExcludingprotected void forwardExcluding(ID from, ID excluding, ContainerMessage data) throws IOException - Specified by:
- forwardExcludingin class- SOContainer
- Parameters:
- from- from
- excluding- excluding
- data- data
- Throws:
- IOException- not thrown by this implementation.
 
 - 
getLeaveDataprotected Serializable getLeaveData(ID target) 
 - 
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
 
 - 
createConnectionprotected abstract ISynchAsynchConnection createConnection(ID targetID, Object data) throws ConnectionCreateException Create connection instance. This method is called byconnect(ID, IConnectContext). Following a return from this method, the new ISynchAsynchConnection instance'sIConnection.connect(ID, Object, int)method is subsequently called.- Parameters:
- targetID- the targetID to connect to. The value is the same as that passed into- connect(ID, IConnectContext).
- data- and data provided to the connection via the IConnectContext passed into the- connect(ID, IConnectContext)call.
- Returns:
- ISynchAsynchConnectiona connection instance. Will not be- null.
- Throws:
- ConnectionCreateException- thrown if the connection cannot be created.
 
 - 
queueContainerMessageprotected void queueContainerMessage(ContainerMessage message) throws IOException - Specified by:
- queueContainerMessagein class- SOContainer
- Throws:
- IOException
 
 - 
forwardExcludingprotected void forwardExcluding(ID from, ID excluding, byte msg, Serializable data) throws IOException - Parameters:
- from- from
- excluding- excluding
- msg- msg
- data- data
- Throws:
- IOException- not thrown by this implementation.
 
 - 
forwardToRemoteprotected void forwardToRemote(ID from, ID to, ContainerMessage message) throws IOException - Specified by:
- forwardToRemotein class- SOContainer
- Parameters:
- from- from
- to- to
- message- message
- Throws:
- IOException- not thrown by this implementation.
 
 - 
getIDForConnectionprotected ID getIDForConnection(IAsynchConnection conn) - Specified by:
- getIDForConnectionin class- SOContainer
 
 - 
handleLeaveprotected void handleLeave(ID fromID, IConnection conn) - Overrides:
- handleLeavein class- SOContainer
 
 - 
sendMessageprotected void sendMessage(ContainerMessage data) throws IOException - Overrides:
- sendMessagein class- SOContainer
- Throws:
- IOException
 
 - 
sendCreateMsgprotected ID[] sendCreateMsg(ID toID, SharedObjectDescription createInfo) throws IOException - Throws:
- IOException
 
 - 
sendCreateprotected void sendCreate(ID sharedObjectId, ID toContainerId, SharedObjectDescription sd) throws IOException - Overrides:
- sendCreatein class- SOContainer
- Throws:
- IOException
 
 - 
sendCreateResponseprotected void sendCreateResponse(ID homeId, ID sharedObjectId, Throwable t, long identifier) throws IOException - Overrides:
- sendCreateResponsein class- SOContainer
- Throws:
- IOException
 
 - 
sendCreateResponseSharedObjectMessageprotected void sendCreateResponseSharedObjectMessage(ID toContainerId, ID fromSharedObject, Throwable t, long ident) throws IOException - Overrides:
- sendCreateResponseSharedObjectMessagein class- SOContainer
- Throws:
- IOException
 
 - 
sendCreateSharedObjectMessageprotected ID[] sendCreateSharedObjectMessage(ID toContainerId, SharedObjectDescription sd) throws IOException - Overrides:
- sendCreateSharedObjectMessagein class- SOContainer
- Throws:
- IOException
 
 - 
sendDisposeprotected void sendDispose(ID toContainerId, ID sharedObjectId) throws IOException - Overrides:
- sendDisposein class- SOContainer
- Throws:
- IOException
 
 - 
sendDisposeSharedObjectMessageprotected void sendDisposeSharedObjectMessage(ID toContainerId, ID fromSharedObject) throws IOException - Overrides:
- sendDisposeSharedObjectMessagein class- SOContainer
- Throws:
- IOException
 
 - 
sendMessageprotected void sendMessage(ID toContainerId, ID sharedObjectId, Object message) throws IOException - Overrides:
- sendMessagein class- SOContainer
- Throws:
- IOException
 
 - 
sendSharedObjectMessageprotected void sendSharedObjectMessage(ID toContainerId, ID fromSharedObject, Serializable data) throws IOException - Overrides:
- sendSharedObjectMessagein class- SOContainer
- Throws:
- IOException
 
 - 
disconnectprotected void disconnect(Throwable exception) 
 - 
processDisconnectprotected void processDisconnect(DisconnectEvent evt) - Specified by:
- processDisconnectin class- SOContainer
 
 - 
processAsynchprotected void processAsynch(AsynchEvent evt) throws IOException - Overrides:
- processAsynchin class- SOContainer
- Parameters:
- evt- event
- Throws:
- IOException- not thrown by this implementation.
 
 - 
processSynchprotected Serializable processSynch(SynchEvent evt) throws IOException - Overrides:
- processSynchin class- SOContainer
- Throws:
- IOException
 
 - 
isConnectedprotected boolean isConnected() 
 - 
isConnectingprotected boolean isConnecting() 
 
- 
 
-