|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.endpoint.msgframing.WelcomeMessage
public class WelcomeMessage
Contains a JXTA connection Welcome Message. The Welcome Message is sent by both participant peers as the first interchange on newly opened connections.
The Welcome Message contains the following information:
Constructor Summary | |
---|---|
WelcomeMessage()
Default constructor |
|
WelcomeMessage(EndpointAddress destAddr,
EndpointAddress publicaddress,
ID peerid,
boolean dontPropagate)
Creates a new instance of WelcomeMessage for our Welcome Message. |
|
WelcomeMessage(EndpointAddress destAddr,
EndpointAddress publicaddress,
ID peerid,
boolean dontPropagate,
int preferredMsgVersion)
Creates a new instance of WelcomeMessage for our Welcome Message. |
|
WelcomeMessage(InputStream in)
Creates a new instance of WelcomeMessage for another peer's Welcome Message |
Method Summary | |
---|---|
boolean |
dontPropagate()
Return the propagation preference from the Welcome Message. |
ByteBuffer |
getByteBuffer()
Write the welcome to a socket channel |
EndpointAddress |
getDestinationAddress()
Return the destination address associated with the Welcome Message. |
ID |
getPeerID()
Return the peerid associated with the Welcome Message. |
int |
getPreferredMessageVersion()
Return the preferred message version from the Welcome Message. |
EndpointAddress |
getPublicAddress()
Return the source address associated with the Welcome Message. |
String |
getWelcomeString()
Return a String containing the Welcome Message. |
String |
getWelcomeVersion()
Return the version associated with the Welcome Message. |
boolean |
read(ByteBuffer buffer)
Attempts to init a welcome object from a socketChannel |
void |
sendToStream(OutputStream theStream)
Write the welcome message to the provided stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WelcomeMessage()
public WelcomeMessage(EndpointAddress destAddr, EndpointAddress publicaddress, ID peerid, boolean dontPropagate)
destAddr
- The destination address that we believe we are connecting to.publicaddress
- Our return address, the purported source address of this connection.peerid
- Our peerid, the logical return address.dontPropagate
- If true this connection does not wish to receive any propagation/broadcast/notifications.public WelcomeMessage(EndpointAddress destAddr, EndpointAddress publicaddress, ID peerid, boolean dontPropagate, int preferredMsgVersion)
destAddr
- The destination address that we believe we are connecting to.publicaddress
- Our return address, the purported source address of this connection.peerid
- Our peerid, the logical return address.dontPropagate
- If true this connection does not wish to receive any propagation/broadcast/notifications.preferredMsgVersion
- Binary Wire Messsage format we prefer.public WelcomeMessage(InputStream in) throws IOException
in
- The InputStream to read the welcome message from.
IOException
- If there is a problem reading the welcome header.Method Detail |
---|
public boolean read(ByteBuffer buffer) throws IOException
buffer
- the data buffer
IOException
- if an io error occurspublic void sendToStream(OutputStream theStream) throws IOException
theStream
- The OutputStream to which to write the welcome message.
IOException
- If there is a problem writing the welcome message.public ByteBuffer getByteBuffer() throws IOException
IOException
- if an io error occurspublic ID getPeerID()
public EndpointAddress getPublicAddress()
public EndpointAddress getDestinationAddress()
public boolean dontPropagate()
public int getPreferredMessageVersion()
public String getWelcomeVersion()
public String getWelcomeString()
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |