|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.instantp2p.Chat
Chat utility in InstantP2P: send and receive message from other users.
Field Summary | |
static int |
CHAT_ERROR
|
static java.lang.String |
CHATNAMETAG
|
protected net.jxta.instantp2p.Chat.ChatServer |
chatServer
The thread that runs the actual chatting procedure |
protected net.jxta.peergroup.PeerGroup |
group
The current peer group |
static int |
HUNKYDORY
|
protected MessageBoard |
messageBoard
The MessageBoard intance to use for display |
protected java.lang.String |
myName
The name used as a handle for this chat |
protected net.jxta.protocol.PipeAdvertisement |
myPipeAdvt
The PipeAdvertisment pertaining to the pipe over which the chat is conducted |
protected net.jxta.pipe.OutputPipe |
outputPipe
The pipe to which we write outgoing messages |
protected net.jxta.pipe.Pipe |
pipes
The Pipe service to use |
protected static int |
PipeTimeout
|
protected boolean |
secured
Is this a secure chat - default is false |
Constructor Summary | |
Chat(net.jxta.peergroup.PeerGroup group,
MessageBoard messageBoard)
Chat Constructor |
Method Summary | |
void |
groupChanged(net.jxta.peergroup.PeerGroup group)
groupChanged - acts on change of peer group |
int |
login(java.lang.String name,
boolean secured)
|
int |
logout()
logout a user |
void |
peerChanged(net.jxta.protocol.PeerGroupAdvertisement pgAdv)
peerChanged - acts on change of peer for chat |
net.jxta.protocol.PipeAdvertisement |
registerUser(java.lang.String name)
Registers a new user. |
int |
sendMessage(java.lang.String message)
Sends messages to the receiver end |
int |
sendMessageToPeers(java.lang.String message)
sendMessageToPeers - sends message to listening peer(s). |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected net.jxta.protocol.PipeAdvertisement myPipeAdvt
public static final java.lang.String CHATNAMETAG
protected net.jxta.peergroup.PeerGroup group
protected MessageBoard messageBoard
protected net.jxta.pipe.Pipe pipes
protected java.lang.String myName
protected net.jxta.pipe.OutputPipe outputPipe
public static final int HUNKYDORY
public static final int CHAT_ERROR
protected static final int PipeTimeout
protected net.jxta.instantp2p.Chat.ChatServer chatServer
protected boolean secured
Constructor Detail |
public Chat(net.jxta.peergroup.PeerGroup group, MessageBoard messageBoard)
PeerGroup
- group - chat groupMessageBoard
- messageBoard - to display messagesMethod Detail |
public void groupChanged(net.jxta.peergroup.PeerGroup group)
PeerGroup
- group - changed group object
currently, Chat is provided in NetPeerGroup only,
so that everyone can chat with everyone.public void peerChanged(net.jxta.protocol.PeerGroupAdvertisement pgAdv)
PeerGroupAdvertisement
- pgAdv - changed group Advt objectpublic int login(java.lang.String name, boolean secured)
public int logout()
String
- name - name used for loggingpublic int sendMessageToPeers(java.lang.String message)
String
- message - to be sentpublic int sendMessage(java.lang.String message)
String
- message - message to be dispatchedpublic net.jxta.protocol.PipeAdvertisement registerUser(java.lang.String name)
String
- name - user name
|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |