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,
Object data)
Create connection instance.
|
void |
disconnect()
Disconnect.
|
protected void |
disconnect(Throwable exception) |
void |
dispose()
Dispose this IContainer instance.
|
protected void |
forwardExcluding(ID from,
ID excluding,
byte msg,
Serializable data) |
protected void |
forwardExcluding(ID from,
ID excluding,
ContainerMessage data) |
protected void |
forwardToRemote(ID from,
ID to,
ContainerMessage message) |
protected 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 Serializable |
getLeaveData(ID target) |
protected ID |
handleConnectResponse(ID orginalTarget,
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 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,
Throwable t,
long identifier) |
protected void |
sendCreateResponseSharedObjectMessage(ID toContainerId,
ID fromSharedObject,
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,
Object message) |
protected void |
sendSharedObjectMessage(ID toContainerId,
ID fromSharedObject,
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 Object getConnectData(ID remote, IConnectContext joinContext) throws IOException, UnsupportedCallbackException
protected int getConnectTimeout()
protected void handleLeaveGroupMessage(ContainerMessage mess)
handleLeaveGroupMessage in class SOContainermess - leave group messageprotected void handleViewChangeMessage(ContainerMessage mess) throws IOException
handleViewChangeMessage in class SOContainerIOExceptionprotected void forwardExcluding(ID from, ID excluding, ContainerMessage data) throws IOException
forwardExcluding in class SOContainerfrom - fromexcluding - excludingdata - dataIOException - not thrown by this implementation.protected Serializable getLeaveData(ID target)
public void disconnect()
IContainernull.disconnect in interface IContainerdisconnect in class SOContainerprotected abstract ISynchAsynchConnection createConnection(ID targetID, 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 IOException
queueContainerMessage in class SOContainerIOExceptionprotected void forwardExcluding(ID from, ID excluding, byte msg, Serializable data) throws IOException
from - fromexcluding - excludingmsg - msgdata - dataIOException - not thrown by this implementation.protected void forwardToRemote(ID from, ID to, ContainerMessage message) throws IOException
forwardToRemote in class SOContainerfrom - fromto - tomessage - messageIOException - 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 IOException
sendMessage in class SOContainerIOExceptionprotected ID[] sendCreateMsg(ID toID, SharedObjectDescription createInfo) throws IOException
IOExceptionprotected void sendCreate(ID sharedObjectId, ID toContainerId, SharedObjectDescription sd) throws IOException
sendCreate in class SOContainerIOExceptionprotected void sendCreateResponse(ID homeId, ID sharedObjectId, Throwable t, long identifier) throws IOException
sendCreateResponse in class SOContainerIOExceptionprotected void sendCreateResponseSharedObjectMessage(ID toContainerId, ID fromSharedObject, Throwable t, long ident) throws IOException
sendCreateResponseSharedObjectMessage in class SOContainerIOExceptionprotected ID[] sendCreateSharedObjectMessage(ID toContainerId, SharedObjectDescription sd) throws IOException
sendCreateSharedObjectMessage in class SOContainerIOExceptionprotected void sendDispose(ID toContainerId, ID sharedObjectId) throws IOException
sendDispose in class SOContainerIOExceptionprotected void sendDisposeSharedObjectMessage(ID toContainerId, ID fromSharedObject) throws IOException
sendDisposeSharedObjectMessage in class SOContainerIOExceptionprotected void sendMessage(ID toContainerId, ID sharedObjectId, Object message) throws IOException
sendMessage in class SOContainerIOExceptionprotected void sendSharedObjectMessage(ID toContainerId, ID fromSharedObject, Serializable data) throws IOException
sendSharedObjectMessage in class SOContainerIOExceptionprotected void disconnect(Throwable exception)
protected void processDisconnect(DisconnectEvent evt)
processDisconnect in class SOContainerprotected void processAsynch(AsynchEvent evt) throws IOException
processAsynch in class SOContainerevt - eventIOException - not thrown by this implementation.protected Serializable processSynch(SynchEvent evt) throws IOException
processSynch in class SOContainerIOExceptionprotected boolean isConnected()
protected boolean isConnecting()
Copyright © 2004–2020 Eclipse Foundation. All rights reserved.