|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--pawn.services.chat.ChatServiceImpl
The implementation of the ChatService interface. This service builds on top of the Resolver service to provide the functionality for requesting and approving a chat session.
| Field Summary | |
static java.lang.String |
refModuleSpecID
The Module Specification ID for the Chat service. |
| Fields inherited from interface pawn.services.chat.ChatService |
refModuleClassID |
| Constructor Summary | |
ChatServiceImpl()
Create a new ChatServiceImpl object. |
|
| Method Summary | |
void |
addListener(pawn.services.chat.ChatListener listener)
Add a listener object to the service. |
void |
approveChat(net.jxta.protocol.PipeAdvertisement pipeAdvertisement,
java.lang.String emailAddress,
java.lang.String displayName,
int queryID)
Approve a chat session. |
net.jxta.document.Advertisement |
getImplAdvertisement()
Returns the advertisement for this service. |
net.jxta.service.Service |
getInterface()
Returns an interface used to protect this service. |
void |
init(net.jxta.peergroup.PeerGroup group,
net.jxta.id.ID assignedID,
net.jxta.document.Advertisement implAdv)
Initialize the service. |
net.jxta.protocol.ResolverResponseMsg |
processQuery(net.jxta.protocol.ResolverQueryMsg query)
Process a Resolver Query Message. |
void |
processResponse(net.jxta.protocol.ResolverResponseMsg response)
Process a Resolver response message. |
boolean |
removeListener(pawn.services.chat.ChatListener listener)
Remove a given listener object from the service. |
void |
requestChat(java.lang.String peerID,
java.lang.String emailAddress,
java.lang.String displayName,
pawn.services.chat.ChatListener listener)
Send a request to chat to the peer specified. |
int |
startApp(java.lang.String[] args)
Start the service. |
void |
stopApp()
Stop the service. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String refModuleSpecID
| Constructor Detail |
public ChatServiceImpl()
| Method Detail |
public void addListener(pawn.services.chat.ChatListener listener)
addListener in interface ChatServicelistener - the listener object to register with the service.
public void approveChat(net.jxta.protocol.PipeAdvertisement pipeAdvertisement,
java.lang.String emailAddress,
java.lang.String displayName,
int queryID)
approveChat in interface ChatServicepipeAdvertisement - the advertisement for the pipe that will be used to set up the chat session.emailAddress - the emailAddress of the user associated with local peer.displayName - the name of the user associated with the local peer.queryID - the query ID to use to send to the Resolver Response Message containing
the response, allowing the remote peer to match the response to an initial request.public net.jxta.document.Advertisement getImplAdvertisement()
getImplAdvertisement in interface net.jxta.service.Servicepublic net.jxta.service.Service getInterface()
getInterface in interface net.jxta.service.Service
public void init(net.jxta.peergroup.PeerGroup group,
net.jxta.id.ID assignedID,
net.jxta.document.Advertisement implAdv)
throws net.jxta.exception.PeerGroupException
init in interface net.jxta.platform.Modulegroup - the PeerGroup containing this service.assignedID - the identifier for this service.implAdv - the advertisement specifying this service.
net.jxta.exception.PeerGroupException - is not thrown ever by this implementation.
public net.jxta.protocol.ResolverResponseMsg processQuery(net.jxta.protocol.ResolverQueryMsg query)
throws java.io.IOException,
net.jxta.exception.NoResponseException,
net.jxta.exception.DiscardQueryException,
net.jxta.exception.ResendQueryException
processQuery in interface net.jxta.resolver.QueryHandlerjava.io.IOException
net.jxta.exception.NoResponseException
net.jxta.exception.DiscardQueryException
net.jxta.exception.ResendQueryExceptionpublic void processResponse(net.jxta.protocol.ResolverResponseMsg response)
processResponse in interface net.jxta.resolver.QueryHandlerresponse - a response message to be processed.public boolean removeListener(pawn.services.chat.ChatListener listener)
removeListener in interface ChatServicelistener - the listener object to unregister.
public void requestChat(java.lang.String peerID,
java.lang.String emailAddress,
java.lang.String displayName,
pawn.services.chat.ChatListener listener)
requestChat in interface ChatServicepeerID - the peerID of the remote peer to request for a chat session.emailAddress - the email address of the user associated with the local peer.displayName - the display name of the user associated with the local peer.listener - the listener to notify when a response to this request is received.public int startApp(java.lang.String[] args)
startApp in interface net.jxta.platform.Moduleargs - the arguments to the service. Not used.
public void stopApp()
stopApp in interface net.jxta.platform.Module
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||