public abstract class ClientSOContainer extends SOContainer implements ISharedObjectContainerClient
| Modifier and Type | Field and Description |
|---|---|
static byte |
CONNECTED |
static byte |
CONNECTING |
protected ISynchAsynchConnection |
connection |
protected byte |
connectionState |
protected org.eclipse.ecf.provider.generic.ClientSOContainer.Lock |
connectLock |
protected IConnectInitiatorPolicy |
connectPolicy |
static int |
DEFAULT_CONNECT_TIMEOUT |
static byte |
DISCONNECTED |
protected ID |
remoteServerID |
config, DEFAULT_OBJECT_ARG_KEY, DEFAULT_OBJECT_ARGTYPES_KEY, groupManager, isClosing, loadingThreadGroup, policy, receiver, sharedObjectManager, sharedObjectMessageSerializer, sharedObjectThreadGroup| Constructor and Description |
|---|
ClientSOContainer(ISharedObjectContainerConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(ID targetID,
IConnectContext joinContext)
Connect to a target remote process or process group.
|
protected Callback[] |
createAuthorizationCallbacks() |
protected abstract ISynchAsynchConnection |
createConnection(ID targetID,
java.lang.Object data)
Create connection instance.
|
void |
disconnect()
Disconnect.
|
protected void |
disconnect(java.lang.Throwable exception) |
void |
dispose()
Dispose this IContainer instance.
|
protected void |
forwardExcluding(ID from,
ID excluding,
byte msg,
java.io.Serializable data) |
protected void |
forwardExcluding(ID from,
ID excluding,
ContainerMessage data) |
protected void |
forwardToRemote(ID from,
ID to,
ContainerMessage message) |
protected java.lang.Object |
getConnectData(ID remote,
IConnectContext joinContext) |
ID |
getConnectedID()
Get the target ID that this container instance has connected to.
|
protected ISynchAsynchConnection |
getConnection() |
protected org.eclipse.ecf.provider.generic.ClientSOContainer.Lock |
getConnectLock() |
protected int |
getConnectTimeout() |
protected ID |
getIDForConnection(IAsynchConnection conn) |
protected java.io.Serializable |
getLeaveData(ID target) |
protected ID |
handleConnectResponse(ID orginalTarget,
java.lang.Object serverData) |
protected void |
handleLeave(ID fromID,
IConnection conn) |
protected void |
handleLeaveGroupMessage(ContainerMessage mess) |
protected void |
handleViewChangeMessage(ContainerMessage mess) |
protected boolean |
isConnected() |
protected boolean |
isConnecting() |
boolean |
isGroupManager() |
protected void |
processAsynch(AsynchEvent evt) |
protected void |
processDisconnect(DisconnectEvent evt) |
protected java.io.Serializable |
processSynch(SynchEvent evt) |
protected void |
queueContainerMessage(ContainerMessage message) |
protected void |
sendCreate(ID sharedObjectId,
ID toContainerId,
SharedObjectDescription sd) |
protected ID[] |
sendCreateMsg(ID toID,
SharedObjectDescription createInfo) |
protected void |
sendCreateResponse(ID homeId,
ID sharedObjectId,
java.lang.Throwable t,
long identifier) |
protected void |
sendCreateResponseSharedObjectMessage(ID toContainerId,
ID fromSharedObject,
java.lang.Throwable t,
long ident) |
protected ID[] |
sendCreateSharedObjectMessage(ID toContainerId,
SharedObjectDescription sd) |
protected void |
sendDispose(ID toContainerId,
ID sharedObjectId) |
protected void |
sendDisposeSharedObjectMessage(ID toContainerId,
ID fromSharedObject) |
protected void |
sendMessage(ContainerMessage data) |
protected void |
sendMessage(ID toContainerId,
ID sharedObjectId,
java.lang.Object message) |
protected void |
sendSharedObjectMessage(ID toContainerId,
ID fromSharedObject,
java.io.Serializable data) |
void |
setConnectInitiatorPolicy(IConnectInitiatorPolicy policy)
Set the connect initiator policy handler for authentication policy
|
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, 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, verifyToIDForSharedObjectMessageaddListener, fireContainerEvent, getPasswordFromConnectContext, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, removeListenerpublic static final int DEFAULT_CONNECT_TIMEOUT
protected ISynchAsynchConnection connection
protected ID remoteServerID
protected byte connectionState
protected IConnectInitiatorPolicy connectPolicy
public static final byte DISCONNECTED
public static final byte CONNECTING
public static final byte CONNECTED
protected org.eclipse.ecf.provider.generic.ClientSOContainer.Lock connectLock
public ClientSOContainer(ISharedObjectContainerConfig config)
protected org.eclipse.ecf.provider.generic.ClientSOContainer.Lock getConnectLock()
protected ISynchAsynchConnection getConnection()
public void setConnectInitiatorPolicy(IConnectInitiatorPolicy policy)
ISharedObjectContainerClientsetConnectInitiatorPolicy in interface ISharedObjectContainerClientpolicy - the policy to usepublic void dispose()
IContainerdispose in interface IContainerdispose in class SOContainerpublic final boolean isGroupManager()
isGroupManager in interface IReliableContainerisGroupManager in class SOContainerpublic ID getConnectedID()
IContainergetConnectedID in interface IContainergetConnectedID in class SOContainernull
if container not connected.public void connect(ID targetID, IConnectContext joinContext) throws ContainerConnectException
IContainerconnect in interface IContainerconnect in class SOContainertargetID - 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 null if underlying provider does not
have any authentication requirements for connection.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.protected Callback[] createAuthorizationCallbacks()
protected java.lang.Object getConnectData(ID remote, IConnectContext joinContext) throws java.io.IOException, UnsupportedCallbackException
java.io.IOExceptionUnsupportedCallbackExceptionprotected int getConnectTimeout()
protected void handleLeaveGroupMessage(ContainerMessage mess)
handleLeaveGroupMessage in class SOContainermess - leave group messageprotected void handleViewChangeMessage(ContainerMessage mess) throws java.io.IOException
handleViewChangeMessage in class SOContainerjava.io.IOExceptionprotected void forwardExcluding(ID from, ID excluding, ContainerMessage data) throws java.io.IOException
forwardExcluding in class SOContainerfrom - fromexcluding - excludingdata - datajava.io.IOException - not thrown by this implementation.protected java.io.Serializable getLeaveData(ID target)
public void disconnect()
IContainernull.disconnect in interface IContainerdisconnect in class SOContainerprotected abstract ISynchAsynchConnection createConnection(ID targetID, java.lang.Object data) throws ConnectionCreateException
connect(ID, IConnectContext). Following
a return from this method, the new ISynchAsynchConnection instance's IConnection.connect(ID, Object, int) method is subsequently
called.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.ISynchAsynchConnection a connection instance. Will not be null.ConnectionCreateException - thrown if the connection cannot be created.protected void queueContainerMessage(ContainerMessage message) throws java.io.IOException
queueContainerMessage in class SOContainerjava.io.IOExceptionprotected void forwardExcluding(ID from, ID excluding, byte msg, java.io.Serializable data) throws java.io.IOException
from - fromexcluding - excludingmsg - msgdata - datajava.io.IOException - not thrown by this implementation.protected void forwardToRemote(ID from, ID to, ContainerMessage message) throws java.io.IOException
forwardToRemote in class SOContainerfrom - fromto - tomessage - messagejava.io.IOException - not thrown by this implementation.protected ID getIDForConnection(IAsynchConnection conn)
getIDForConnection in class SOContainerprotected void handleLeave(ID fromID, IConnection conn)
handleLeave in class SOContainerprotected void sendMessage(ContainerMessage data) throws java.io.IOException
sendMessage in class SOContainerjava.io.IOExceptionprotected ID[] sendCreateMsg(ID toID, SharedObjectDescription createInfo) throws java.io.IOException
java.io.IOExceptionprotected void sendCreate(ID sharedObjectId, ID toContainerId, SharedObjectDescription sd) throws java.io.IOException
sendCreate in class SOContainerjava.io.IOExceptionprotected void sendCreateResponse(ID homeId, ID sharedObjectId, java.lang.Throwable t, long identifier) throws java.io.IOException
sendCreateResponse in class SOContainerjava.io.IOExceptionprotected void sendCreateResponseSharedObjectMessage(ID toContainerId, ID fromSharedObject, java.lang.Throwable t, long ident) throws java.io.IOException
sendCreateResponseSharedObjectMessage in class SOContainerjava.io.IOExceptionprotected ID[] sendCreateSharedObjectMessage(ID toContainerId, SharedObjectDescription sd) throws java.io.IOException
sendCreateSharedObjectMessage in class SOContainerjava.io.IOExceptionprotected void sendDispose(ID toContainerId, ID sharedObjectId) throws java.io.IOException
sendDispose in class SOContainerjava.io.IOExceptionprotected void sendDisposeSharedObjectMessage(ID toContainerId, ID fromSharedObject) throws java.io.IOException
sendDisposeSharedObjectMessage in class SOContainerjava.io.IOExceptionprotected void sendMessage(ID toContainerId, ID sharedObjectId, java.lang.Object message) throws java.io.IOException
sendMessage in class SOContainerjava.io.IOExceptionprotected void sendSharedObjectMessage(ID toContainerId, ID fromSharedObject, java.io.Serializable data) throws java.io.IOException
sendSharedObjectMessage in class SOContainerjava.io.IOExceptionprotected void disconnect(java.lang.Throwable exception)
protected void processDisconnect(DisconnectEvent evt)
processDisconnect in class SOContainerprotected void processAsynch(AsynchEvent evt) throws java.io.IOException
processAsynch in class SOContainerevt - eventjava.io.IOException - not thrown by this implementation.protected java.io.Serializable processSynch(SynchEvent evt) throws java.io.IOException
processSynch in class SOContainerjava.io.IOExceptionprotected boolean isConnected()
protected boolean isConnecting()