|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ecf.provider.generic.SOContainer
org.eclipse.ecf.provider.generic.ClientSOContainer
org.eclipse.ecf.provider.xmpp.container.XMPPClientSOContainer
public class XMPPClientSOContainer
| Field Summary | |
|---|---|
static int |
DEFAULT_KEEPALIVE
|
protected XMPPPresenceSharedObject |
delegate
|
protected ID |
delegateID
|
protected static java.lang.String |
GOOGLE_SERVICENAME
|
protected IIMMessageSender |
messageSender
|
static java.lang.String |
NAMESPACE_IDENTIFIER
|
static java.lang.String |
XMPP_DELEGATE_ID
|
| Fields inherited from class org.eclipse.ecf.provider.generic.ClientSOContainer |
|---|
CONNECTED, CONNECTING, connection, connectionState, connectLock, 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, sharedObjectThreadGroup |
| Constructor Summary | |
|---|---|
|
XMPPClientSOContainer()
|
|
XMPPClientSOContainer(int ka)
|
protected |
XMPPClientSOContainer(SOContainerConfig config,
int keepAlive)
|
|
XMPPClientSOContainer(java.lang.String userhost,
int ka)
|
| Method Summary | |
|---|---|
protected void |
addChat(IChatRoomContainer container)
|
protected void |
addFileTransferListener(IFileTransferListener listener)
|
void |
addListener(IIncomingFileTransferRequestListener listener)
Add incoming file transfer listener. |
protected void |
addSharedObjectToContainer(ID remote)
|
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)
|
protected ID |
createIDFromHostedRoom(org.jivesoftware.smackx.muc.HostedRoom room)
|
protected org.jivesoftware.smack.packet.Presence |
createPresenceFromIPresence(IPresence presence)
|
protected SOContext |
createSharedObjectContext(SOConfig soconfig,
IQueueEnqueue queue)
|
protected void |
deliverEvent(Event evt)
|
void |
disconnect()
Disconnect. |
void |
dispose()
Dispose this IContainer instance. |
protected void |
disposeChatRooms()
|
protected void |
dumpStack(java.lang.Throwable t,
java.lang.String msg)
|
protected IChatRoomContainer |
findReceiverChatRoom(ID toID)
|
protected void |
fireFileTransferEvent(IFileTransferEvent event)
|
java.lang.Object |
getAdapter(java.lang.Class clazz)
This specialization of IAdaptable.getAdapter() returns additional services supported by this container. |
protected IRoomInfo |
getChatRoomInfo(ID roomID)
|
protected IRoomInfo |
getChatRoomInfo(java.lang.String roomname)
|
protected ID[] |
getChatRooms()
|
Namespace |
getConnectNamespace()
Get the Namespace expected by the remote target container. |
protected int |
getConnectTimeout()
|
protected java.util.Collection |
getHostedRoomForService(java.lang.String svc)
|
Namespace |
getOutgoingFileTransferNamespace()
|
org.jivesoftware.smack.Roster |
getRoster()
|
protected boolean |
handleAsExtension(org.jivesoftware.smack.packet.Packet packet)
|
protected ID |
handleConnectResponse(ID originalTarget,
java.lang.Object serverData)
|
protected void |
handleInvitationMessage(org.jivesoftware.smack.XMPPConnection arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4,
org.jivesoftware.smack.packet.Message arg5)
|
protected void |
handleXMPPMessage(org.jivesoftware.smack.packet.Packet aPacket)
|
protected void |
processAsynch(AsynchConnectionEvent e)
|
protected void |
removeChat(IChatRoomContainer container)
|
protected void |
removeFileTransferListener(IFileTransferListener listener)
|
boolean |
removeListener(IIncomingFileTransferRequestListener listener)
Remove incoming file transfer listener |
void |
sendMessage(ID target,
java.lang.String message)
|
void |
sendOutgoingRequest(ID targetReceiver,
java.io.File localFileToSend,
IFileTransferListener transferListener)
Send request for outgoing file transfer. |
void |
sendOutgoingRequest(ID targetReceiver,
IFileTransferInfo localFileToSend,
IFileTransferListener progressListener)
Send request for outgoing file transfer. |
protected void |
sendPresenceUpdate(ID target,
org.jivesoftware.smack.packet.Presence presence)
|
protected void |
sendRosterAdd(java.lang.String user,
java.lang.String name,
java.lang.String[] groups)
|
protected void |
sendRosterRemove(java.lang.String user)
|
protected void |
trace(java.lang.String msg)
|
| Methods inherited from class org.eclipse.ecf.provider.generic.ClientSOContainer |
|---|
forwardExcluding, forwardExcluding, forwardToRemote, getConnectedID, getConnection, getConnectLock, getIDForConnection, getLeaveData, handleLeaveGroupMessage, handleViewChangeMessage, isConnected, isConnecting, isGroupManager, memberLeave, processDisconnect, processSynch, queueContainerMessage, sendCreateMsg, sendMessage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_KEEPALIVE
public static final java.lang.String NAMESPACE_IDENTIFIER
public static final java.lang.String XMPP_DELEGATE_ID
protected static final java.lang.String GOOGLE_SERVICENAME
protected IIMMessageSender messageSender
protected XMPPPresenceSharedObject delegate
protected ID delegateID
| Constructor Detail |
|---|
protected XMPPClientSOContainer(SOContainerConfig config,
int keepAlive)
throws java.lang.Exception
java.lang.Exception
public XMPPClientSOContainer()
throws java.lang.Exception
java.lang.Exception
public XMPPClientSOContainer(int ka)
throws java.lang.Exception
java.lang.Exception
public XMPPClientSOContainer(java.lang.String userhost,
int ka)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
protected void addChat(IChatRoomContainer container)
protected void removeChat(IChatRoomContainer container)
protected void trace(java.lang.String msg)
protected void dumpStack(java.lang.Throwable t,
java.lang.String msg)
protected void disposeChatRooms()
protected IChatRoomContainer findReceiverChatRoom(ID toID)
protected void handleInvitationMessage(org.jivesoftware.smack.XMPPConnection arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4,
org.jivesoftware.smack.packet.Message arg5)
protected ID handleConnectResponse(ID originalTarget,
java.lang.Object serverData)
throws java.lang.Exception
handleConnectResponse in class ClientSOContainerjava.lang.Exception
protected void addSharedObjectToContainer(ID remote)
throws SharedObjectAddException
SharedObjectAddExceptionpublic void dispose()
IContainer
dispose in interface IContainerdispose in class ClientSOContainer
protected ISynchAsynchConnection createConnection(ID remoteSpace,
java.lang.Object data)
throws ConnectionInstantiationException
createConnection in class ClientSOContainerConnectionInstantiationException
protected java.lang.Object createConnectData(ID target,
Callback[] cbs,
java.lang.Object data)
createConnectData in class ClientSOContainerprotected Callback[] createAuthorizationCallbacks()
createAuthorizationCallbacks in class ClientSOContainerprotected int getConnectTimeout()
getConnectTimeout in class ClientSOContainer
public org.jivesoftware.smack.Roster getRoster()
throws java.io.IOException
java.io.IOExceptionpublic Namespace getConnectNamespace()
IContainer
getConnectNamespace in interface IContainergetConnectNamespace in class SOContainerprotected void deliverEvent(Event evt)
protected void handleXMPPMessage(org.jivesoftware.smack.packet.Packet aPacket)
throws java.io.IOException
java.io.IOExceptionprotected boolean handleAsExtension(org.jivesoftware.smack.packet.Packet packet)
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 tojoinContext - any required context to allow this container to authenticate
ContainerConnectException - thrown if communication cannot be established with remote
servicepublic void disconnect()
IContainer
disconnect in interface IContainerdisconnect in class ClientSOContainer
protected SOContext createSharedObjectContext(SOConfig soconfig,
IQueueEnqueue queue)
createSharedObjectContext in class SOContainerprotected void processAsynch(AsynchConnectionEvent e)
processAsynch in class ClientSOContainer
public void sendMessage(ID target,
java.lang.String message)
throws java.io.IOException
java.io.IOExceptionprotected org.jivesoftware.smack.packet.Presence createPresenceFromIPresence(IPresence presence)
protected void sendPresenceUpdate(ID target,
org.jivesoftware.smack.packet.Presence presence)
throws java.io.IOException
java.io.IOException
protected void sendRosterAdd(java.lang.String user,
java.lang.String name,
java.lang.String[] groups)
throws java.io.IOException
java.io.IOException
protected void sendRosterRemove(java.lang.String user)
throws java.io.IOException
java.io.IOExceptionpublic 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
Platform.getAdapterManager().getAdapter() 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 java.util.Collection getHostedRoomForService(java.lang.String svc)
throws org.jivesoftware.smack.XMPPException
org.jivesoftware.smack.XMPPExceptionprotected ID createIDFromHostedRoom(org.jivesoftware.smackx.muc.HostedRoom room)
protected ID[] getChatRooms()
protected IRoomInfo getChatRoomInfo(ID roomID)
protected IRoomInfo getChatRoomInfo(java.lang.String roomname)
protected void addFileTransferListener(IFileTransferListener listener)
protected void removeFileTransferListener(IFileTransferListener listener)
public void addListener(IIncomingFileTransferRequestListener listener)
IOutgoingFileTransferContainerAdapter
addListener in interface IOutgoingFileTransferContainerAdapterlistener - to receive incoming file transfer request events. Must not be
null
public void sendOutgoingRequest(ID targetReceiver,
IFileTransferInfo localFileToSend,
IFileTransferListener progressListener)
throws OutgoingFileTransferException
IOutgoingFileTransferContainerAdapter
sendOutgoingRequest in interface IOutgoingFileTransferContainerAdaptertargetReceiver - the ID of the remote to receive the file transfer requestlocalFileToSend - the IFileTransferInfo for the local file to send. Must
not be nullprogressListener - a IFileTransferListener for responding to file
transfer events. Must not be null. If the target receiver
responds then an IOutgoingFileTransferResponseEvent
will be delivered to the listener
OutgoingFileTransferException - if the provider is not connected or is not in the correct
state for initiating file transferprotected void fireFileTransferEvent(IFileTransferEvent event)
public Namespace getOutgoingFileTransferNamespace()
public boolean removeListener(IIncomingFileTransferRequestListener listener)
IOutgoingFileTransferContainerAdapter
removeListener in interface IOutgoingFileTransferContainerAdapterlistener - the listener to remove. Must not be null
public void sendOutgoingRequest(ID targetReceiver,
java.io.File localFileToSend,
IFileTransferListener transferListener)
throws OutgoingFileTransferException
IOutgoingFileTransferContainerAdapter
sendOutgoingRequest in interface IOutgoingFileTransferContainerAdaptertargetReceiver - the ID of the remote to receive the file transfer requestlocalFileToSend - the File for the local file to send. Must not be nulltransferListener - a IFileTransferListener for responding to file
transfer events. Must not be null. If the target receiver
responds then an IOutgoingFileTransferResponseEvent
will be delivered to the listener
OutgoingFileTransferException - if the provider is not connected or is not in the correct
state for initiating file transfer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||