|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ecf.core.AbstractContainer org.eclipse.ecf.provider.generic.SOContainer org.eclipse.ecf.provider.generic.ServerSOContainer
public class ServerSOContainer
Field Summary | |
---|---|
protected IConnectHandlerPolicy |
connectHandlerPolicy
|
Fields inherited from class org.eclipse.ecf.provider.generic.SOContainer |
---|
config, DEFAULT_OBJECT_ARG_KEY, DEFAULT_OBJECT_ARGTYPES_KEY, groupManager, isClosing, loadingThreadGroup, policy, receiver, sharedObjectManager, sharedObjectMessageSerializer, sharedObjectThreadGroup |
Constructor Summary | |
---|---|
ServerSOContainer(ISharedObjectContainerConfig config)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.eclipse.ecf.core.AbstractContainer |
---|
addListener, fireContainerEvent, getPasswordFromConnectContext, removeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ecf.core.IContainer |
---|
addListener, removeListener |
Field Detail |
---|
protected IConnectHandlerPolicy connectHandlerPolicy
Constructor Detail |
---|
public ServerSOContainer(ISharedObjectContainerConfig config)
Method Detail |
---|
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
-
java.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
protected 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |