|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ecf.core.AbstractContainer
org.eclipse.ecf.provider.generic.SOContainer
org.eclipse.ecf.provider.generic.ClientSOContainer
org.eclipse.ecf.provider.xmpp.XMPPContainer
public class XMPPContainer
| Field Summary | |
|---|---|
static java.lang.String |
CONNECT_NAMESPACE
|
static java.lang.String |
CONTAINER_HELPER_ID
|
static int |
DEFAULT_KEEPALIVE
|
protected static java.lang.String |
GOOGLE_SERVICENAME
|
protected int |
keepAlive
|
protected ID |
presenceHelperID
|
static java.lang.String |
XMPP_GOOGLE_OVERRIDE_PROP_NAME
|
| Fields inherited from class org.eclipse.ecf.provider.generic.ClientSOContainer |
|---|
CONNECTED, CONNECTING, connection, connectionState, connectLock, connectPolicy, DEFAULT_CONNECT_TIMEOUT, DISCONNECTED, remoteServerID |
| 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 | |
|---|---|
|
XMPPContainer()
|
|
XMPPContainer(int ka)
|
protected |
XMPPContainer(SOContainerConfig config,
int keepAlive)
|
|
XMPPContainer(java.lang.String userhost,
int ka)
|
| Method Summary | |
|---|---|
void |
connect(ID remote,
IConnectContext joinContext)
Connect to a target remote process or process group. |
protected Callback[] |
createAuthorizationCallbacks()
|
protected java.lang.Object |
createConnectData(ID target,
Callback[] cbs,
java.lang.Object data)
|
protected ISynchAsynchConnection |
createConnection(ID remoteSpace,
java.lang.Object data)
Create connection instance. |
protected SOContext |
createSharedObjectContext(SOConfig soconfig,
IQueueEnqueue queue)
|
protected void |
deliverEvent(Event evt)
|
void |
disconnect()
Disconnect. |
void |
dispose()
Dispose this IContainer instance. |
IAccountManager |
getAccountManager()
Get interface for managing account |
java.lang.Object |
getAdapter(java.lang.Class clazz)
This specialization of IAdaptable.getAdapter() returns additional services supported by this container. |
IChatManager |
getChatManager()
Get chat manager for sending and receiving chat messages |
IChatRoomManager |
getChatRoomManager()
Get chat room manager for this presence container. |
protected java.lang.Object |
getConnectData(ID remote,
IConnectContext joinContext)
|
Namespace |
getConnectNamespace()
Get the Namespace for creating a targetID suitable for use as the first parameter in subsequent calls to IContainer.connect(ID, IConnectContext). |
protected int |
getConnectTimeout()
|
ECFConnection |
getECFConnection()
|
protected Roster |
getRoster()
|
IRosterManager |
getRosterManager()
Get roster manager for access to roster model. |
IUserSearchManager |
getUserSearchManager()
Retrieve interface for search on the provide. |
XMPPConnection |
getXMPPConnection()
|
protected boolean |
handleAsExtension(Packet packet)
|
protected ID |
handleConnectResponse(ID originalTarget,
java.lang.Object serverData)
|
protected void |
handleXMPPMessage(Packet aPacket)
|
protected boolean |
isGoogle(ID remoteSpace)
|
protected void |
log(java.lang.String msg,
java.lang.Throwable e)
|
protected void |
processAsynch(AsynchEvent e)
|
protected void |
sendMessage(ContainerMessage data)
|
protected boolean |
verifySharedObjectMessageTarget(ID containerID)
|
| 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 |
|---|
public static final int DEFAULT_KEEPALIVE
public static final java.lang.String CONNECT_NAMESPACE
public static final java.lang.String CONTAINER_HELPER_ID
protected static final java.lang.String GOOGLE_SERVICENAME
public static final java.lang.String XMPP_GOOGLE_OVERRIDE_PROP_NAME
protected int keepAlive
protected ID presenceHelperID
| Constructor Detail |
|---|
protected XMPPContainer(SOContainerConfig config,
int keepAlive)
throws java.lang.Exception
java.lang.Exception
public XMPPContainer()
throws java.lang.Exception
java.lang.Exception
public XMPPContainer(int ka)
throws java.lang.Exception
java.lang.Exception
public XMPPContainer(java.lang.String userhost,
int ka)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
protected boolean verifySharedObjectMessageTarget(ID containerID)
verifySharedObjectMessageTarget in class SOContainer
protected void sendMessage(ContainerMessage data)
throws java.io.IOException
sendMessage in class ClientSOContainerjava.io.IOExceptionpublic IRosterManager getRosterManager()
IPresenceContainerAdapter
getRosterManager in interface IPresenceContainerAdapternull if not available for for the implementing
provider.public IUserSearchManager getUserSearchManager()
IPresenceContainerAdapternull) can be used to search users
related to the same provider.
getUserSearchManager in interface IPresenceContainerAdapternull if no search
available for this provider.public IAccountManager getAccountManager()
IPresenceContainerAdapter
getAccountManager in interface IPresenceContainerAdapternull if no account manager
availablepublic IChatRoomManager getChatRoomManager()
IPresenceContainerAdapter
getChatRoomManager in interface IPresenceContainerAdapternull.public IChatManager getChatManager()
IPresenceContainerAdapter
getChatManager in interface IPresenceContainerAdapternull if no chat manager available for given
provider.public Namespace getConnectNamespace()
IContainerIContainer.connect(ID, IConnectContext).
If this method returns null, then it means that
null is expected as a valid parameter in subsequent calls
to IContainer.connect(ID, IConnectContext). If this method returns a non-null
Namespace, then the targetID parameter in
IContainer.connect(ID, IConnectContext) must be non-null
instance created of the returned Namespace.
getConnectNamespace in interface IContainergetConnectNamespace in class SOContainerIContainer.connect(ID, IConnectContext). If null,
then the targetID instances passed to
IContainer.connect(ID, IConnectContext) may be null.
If not null, then targetID
instances passed to IContainer.connect(ID, IConnectContext) must be
instances of the returned Namespace.
public void connect(ID remote,
IConnectContext joinContext)
throws ContainerConnectException
IContainer
connect in interface IContainerconnect in class ClientSOContainerremote - 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 disconnect()
IContainernull.
disconnect in interface IContainerdisconnect in class ClientSOContainerpublic void dispose()
IContainer
dispose in interface IContainerdispose in class ClientSOContainerpublic java.lang.Object getAdapter(java.lang.Class clazz)
IContainerIContainer
should return them using this method. It is recommended that clients use
this method rather than instanceof checks and downcasts to find out about
the capabilities of a specific container.
Typically, after obtaining an IContainer, a client would use this method as a means to obtain a more meaningful interface to the container. This interface may or may not extend IContainer. For example, a client could use the following code to obtain an instance of ISharedObjectContainer:
IContainer newContainer = ContainerFactory.createContainer(type);
ISharedObjectContainer soContainer = (ISharedObjectContainer) newContainer
.getAdapter(ISharedObjectContainer.class);
if (soContainer == null)
throw new ContainerCreateException(message);
Implementations of this method should delegate to
IAdapterManager.loadAdapter() if the service
cannot be provided directly to ensure extensibility by third-party
plug-ins.
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in interface IContainergetAdapter in class SOContainerclazz - the service type to look up
null if this container does not support the given
service
protected ID handleConnectResponse(ID originalTarget,
java.lang.Object serverData)
throws java.lang.Exception
handleConnectResponse in class ClientSOContainerjava.lang.Exception
protected ISynchAsynchConnection createConnection(ID remoteSpace,
java.lang.Object data)
throws ConnectionCreateException
ClientSOContainerClientSOContainer.connect(ID, IConnectContext). Following
a return from this method, the new ISynchAsynchConnection instance's IConnection.connect(ID, Object, int) method is subsequently
called.
createConnection in class ClientSOContainerremoteSpace - the targetID to connect to. The value is the same as that passed into ClientSOContainer.connect(ID, IConnectContext).data - and data provided to the connection via the IConnectContext passed into the ClientSOContainer.connect(ID, IConnectContext)
call.
ISynchAsynchConnection a connection instance. Will not be null.
ConnectionCreateException - thrown if the connection cannot be created.protected boolean isGoogle(ID remoteSpace)
protected java.lang.Object getConnectData(ID remote,
IConnectContext joinContext)
throws java.io.IOException,
UnsupportedCallbackException
getConnectData in class ClientSOContainerjava.io.IOException
UnsupportedCallbackException
protected java.lang.Object createConnectData(ID target,
Callback[] cbs,
java.lang.Object data)
protected Callback[] createAuthorizationCallbacks()
createAuthorizationCallbacks in class ClientSOContainerprotected int getConnectTimeout()
getConnectTimeout in class ClientSOContainer
protected Roster getRoster()
throws java.io.IOException
java.io.IOExceptionprotected void deliverEvent(Event evt)
protected void handleXMPPMessage(Packet aPacket)
throws java.io.IOException
java.io.IOExceptionprotected boolean handleAsExtension(Packet packet)
protected SOContext createSharedObjectContext(SOConfig soconfig,
IQueueEnqueue queue)
createSharedObjectContext in class SOContainerprotected void processAsynch(AsynchEvent e)
processAsynch in class ClientSOContainerpublic ECFConnection getECFConnection()
public XMPPConnection getXMPPConnection()
protected void log(java.lang.String msg,
java.lang.Throwable e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||