fi.hut.tml.xsmiles.comm.implementation.jxta
Class JxtaSession

java.lang.Object
  extended byfi.hut.tml.xsmiles.comm.implementation.general.events.CommEventSenderBase
      extended byfi.hut.tml.xsmiles.comm.implementation.jxta.JxtaSession
All Implemented Interfaces:
CommEventSender, Messaging, Session

public class JxtaSession
extends CommEventSenderBase
implements Messaging, Session

Author:
qlin TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Constructor Summary
JxtaSession()
           
 
Method Summary
 void accept()
          Accept the incoming session
 void addMessageListener(MessageListener listener)
          Add a listerner to receive messages in a session.
 void closeSession()
          Close the session.
 Messaging createMessaging()
           
 void decline()
          Decline the incoming dession.
 Contact getTarget()
          Get the target of the session - that is, the user or group that we're connected to.
 java.util.Vector getUsers()
          Returns the user list for the current session.
 void openSession(Contact _contact)
          Opens the session - in other words, tries to establish a contact to the network.
 void removeMessageListener(MessageListener listener)
           
 void sendMessage(Message msg)
          Send an XML formatted message.
 void sendTextMessage(java.lang.String message)
           
 void sendXMLMessage(org.w3c.dom.Document message)
           
 
Methods inherited from class fi.hut.tml.xsmiles.comm.implementation.general.events.CommEventSenderBase
addEventListener, dispatchEvent, removeEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.comm.events.CommEventSender
addEventListener, dispatchEvent, removeEventListener
 

Constructor Detail

JxtaSession

public JxtaSession()
Method Detail

sendXMLMessage

public void sendXMLMessage(org.w3c.dom.Document message)

sendTextMessage

public void sendTextMessage(java.lang.String message)

addMessageListener

public void addMessageListener(MessageListener listener)
Description copied from interface: Messaging
Add a listerner to receive messages in a session.

Specified by:
addMessageListener in interface Messaging
Parameters:
listener -

removeMessageListener

public void removeMessageListener(MessageListener listener)
Specified by:
removeMessageListener in interface Messaging

openSession

public void openSession(Contact _contact)
Description copied from interface: Session
Opens the session - in other words, tries to establish a contact to the network.

Specified by:
openSession in interface Session

closeSession

public void closeSession()
Description copied from interface: Session
Close the session.

Specified by:
closeSession in interface Session

getUsers

public java.util.Vector getUsers()
Description copied from interface: Session
Returns the user list for the current session.

Specified by:
getUsers in interface Session
Returns:
User list

getTarget

public Contact getTarget()
Description copied from interface: Session
Get the target of the session - that is, the user or group that we're connected to.

Specified by:
getTarget in interface Session
Returns:

accept

public void accept()
Description copied from interface: Session
Accept the incoming session

Specified by:
accept in interface Session

decline

public void decline()
Description copied from interface: Session
Decline the incoming dession.

Specified by:
decline in interface Session

sendMessage

public void sendMessage(Message msg)
Description copied from interface: Messaging
Send an XML formatted message.

Specified by:
sendMessage in interface Messaging

createMessaging

public Messaging createMessaging()
Specified by:
createMessaging in interface Session


X-Smiles 1.2