p2ps.imp.rendezvous
Class RendezvousQueryImp
java.lang.Object
p2ps.imp.rendezvous.RendezvousQueryImp
- All Implemented Interfaces:
- Advertisement, Query, RendezvousQuery, java.io.Serializable
- public class RendezvousQueryImp
- extends java.lang.Object
- implements RendezvousQuery
An implementation of the Pipe Advertisement interface
- Version:
- $Revision: 295 $
- Author:
- Ian Wang
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RendezvousQueryImp
public RendezvousQueryImp(java.lang.String advertid,
java.lang.String peerid)
RendezvousQueryImp
public RendezvousQueryImp(Element root)
throws java.io.IOException
getType
public java.lang.String getType()
- Specified by:
getType in interface Advertisement
- Returns:
- the type for this advertisement
getQueryType
public java.lang.String getQueryType()
- Specified by:
getQueryType in interface Query
- Returns:
- the type of advertisement this query is interested in (e.g.
PipeAdvertisement)
getAdvertID
public java.lang.String getAdvertID()
- Specified by:
getAdvertID in interface Advertisement
- Returns:
- the unique id for this advertisement
getPeerID
public java.lang.String getPeerID()
- Specified by:
getPeerID in interface Advertisement
- Returns:
- the id of the peer that created this advertisement
getExpiryDate
public long getExpiryDate()
- Specified by:
getExpiryDate in interface Advertisement
- Returns:
- the expiry date for this advertisement (-1 if not published)
getReplyURIs
public java.net.URI[] getReplyURIs()
- Specified by:
getReplyURIs in interface Query
- Returns:
- optional endpoint uri for the query reply.
setReplyURIs
public void setReplyURIs(java.net.URI[] replyuri)
- Ssets the optional endpoint uri for the query reply.
- Specified by:
setReplyURIs in interface Query
getXMLAdvert
public Element getXMLAdvert()
throws java.io.IOException
- Output the advert as an xml document
- Specified by:
getXMLAdvert in interface Advertisement
- Returns:
- an XML element for advert
- Throws:
java.io.IOException
getXMLEnvelope
public Element getXMLEnvelope(long expdate)
throws java.io.IOException
- Specified by:
getXMLEnvelope in interface Advertisement
- Parameters:
expdate -
- Returns:
- an XML element for the full enveloped advert (returns the same
as getXMLAdvert if no envelope)
- Throws:
java.io.IOException