public class ServerSOContainer extends SOContainer implements ISharedObjectContainerGroupManager
Modifier and Type | Field and Description |
---|---|
protected IConnectHandlerPolicy |
connectHandlerPolicy |
config, DEFAULT_OBJECT_ARG_KEY, DEFAULT_OBJECT_ARGTYPES_KEY, groupManager, isClosing, loadingThreadGroup, policy, receiver, sharedObjectManager, sharedObjectMessageSerializer, sharedObjectThreadGroup
Constructor and Description |
---|
ServerSOContainer(ISharedObjectContainerConfig config) |
Modifier and Type | Method and Description |
---|---|
protected ContainerMessage |
acceptNewClient(java.net.Socket socket,
java.lang.String target,
java.io.Serializable data,
ISynchAsynchConnection conn) |
protected java.lang.Object |
checkJoin(java.net.SocketAddress saddr,
ID fromID,
java.lang.String target,
java.io.Serializable data) |
void |
connect(ID groupID,
IConnectContext joinContext)
Connect to a target remote process or process group.
|
void |
disconnect()
Disconnect.
|
void |
dispose()
Dispose this IContainer instance.
|
void |
ejectAllGroupMembers(java.io.Serializable reason)
Eject all, for the given reason.
|
void |
ejectGroupMember(ID memberID,
java.io.Serializable reason)
Eject the given groupMemberID from the current group of containers, for
the given reason.
|
protected void |
forwardExcluding(ID from,
ID excluding,
ContainerMessage data) |
protected void |
forwardToRemote(ID from,
ID to,
ContainerMessage data) |
ID |
getConnectedID()
Get the target ID that this container instance has connected to.
|
protected IAsynchConnection |
getConnectionForID(ID memberID) |
protected ID |
getIDForConnection(IAsynchConnection conn) |
protected ISynchConnection |
getSynchConnectionForID(ID memberID) |
protected void |
handleLeaveGroupMessage(ContainerMessage mess) |
protected void |
handleViewChangeMessage(ContainerMessage mess) |
boolean |
isGroupManager() |
protected void |
processDisconnect(DisconnectEvent e) |
protected void |
queueContainerMessage(ContainerMessage message) |
void |
setConnectPolicy(IConnectHandlerPolicy policy)
Set the join policy for this group manager.
|
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, 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
addListener, fireContainerEvent, getPasswordFromConnectContext, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, removeListener
protected IConnectHandlerPolicy connectHandlerPolicy
public ServerSOContainer(ISharedObjectContainerConfig config)
public boolean isGroupManager()
isGroupManager
in interface IReliableContainer
isGroupManager
in class SOContainer
public ID getConnectedID()
IContainer
getConnectedID
in interface IContainer
getConnectedID
in class SOContainer
null
if container not connected.public void disconnect()
IContainer
null
.disconnect
in interface IContainer
disconnect
in class SOContainer
public void ejectGroupMember(ID memberID, java.io.Serializable reason)
ISharedObjectContainerGroupManager
ejectGroupMember
in interface ISharedObjectContainerGroupManager
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 effectreason
- a reason for the ejectionpublic void ejectAllGroupMembers(java.io.Serializable reason)
ISharedObjectContainerGroupManager
ejectAllGroupMembers
in interface ISharedObjectContainerGroupManager
reason
- a reason for the ejectionpublic void dispose()
IContainer
dispose
in interface IContainer
dispose
in class SOContainer
public void connect(ID groupID, IConnectContext joinContext) throws ContainerConnectException
IContainer
connect
in interface IContainer
connect
in class SOContainer
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 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.public void setConnectPolicy(IConnectHandlerPolicy policy)
ISharedObjectContainerGroupManager
setConnectPolicy
in interface ISharedObjectContainerGroupManager
protected void queueContainerMessage(ContainerMessage message) throws java.io.IOException
queueContainerMessage
in class SOContainer
java.io.IOException
protected void forwardToRemote(ID from, ID to, ContainerMessage data) throws java.io.IOException
forwardToRemote
in class SOContainer
java.io.IOException
protected void forwardExcluding(ID from, ID excluding, ContainerMessage data) throws java.io.IOException
forwardExcluding
in class SOContainer
java.io.IOException
protected void handleViewChangeMessage(ContainerMessage mess) throws java.io.IOException
handleViewChangeMessage
in class SOContainer
mess
- messagejava.io.IOException
- not thrown by this implementation.protected ContainerMessage acceptNewClient(java.net.Socket socket, java.lang.String target, java.io.Serializable data, ISynchAsynchConnection conn)
protected java.lang.Object checkJoin(java.net.SocketAddress saddr, ID fromID, java.lang.String target, java.io.Serializable data) throws java.lang.Exception
java.lang.Exception
protected void handleLeaveGroupMessage(ContainerMessage mess)
handleLeaveGroupMessage
in class SOContainer
mess
- leave group messageprotected ID getIDForConnection(IAsynchConnection conn)
getIDForConnection
in class SOContainer
protected IAsynchConnection getConnectionForID(ID memberID)
protected ISynchConnection getSynchConnectionForID(ID memberID)
protected void processDisconnect(DisconnectEvent e)
processDisconnect
in class SOContainer