|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.multicast.advertising.Advertisement
An Advertisement object. This class is used for received as well as transmitted advertisements.
Constructor Summary | |
Advertisement(java.net.InetAddress address,
int ttl)
Creates an advertisement for an address and TTL. |
Method Summary | |
boolean |
addAdvertisementChangeListener(AdvertisementChangeListener changeListener)
Adds a listener for any change in this Advertisement. |
void |
addAttribute(java.lang.String s)
adds an attribute to this Advertisement. |
java.lang.Object |
clone()
Clones this Advertisement object |
java.net.InetAddress |
getAdvertisedAddress()
gets the advertised address. |
int |
getAdvertisedTTL()
gets the advertised TTL. |
long |
getAdvertisementCount()
Returns the number of times the Advertisement has been transmitted |
java.util.Date |
getAdvertisementTimestamp()
Returns the Date of the last transmission of this Advertisement |
java.lang.String[] |
getAttributes()
gets the global attributes of the session. |
int |
getBandwidth()
gets the session bandwidth. |
int |
getCurrentAdvertisementInterval()
Returns the number of seconds between the last two transmissions of this Advertisement |
java.lang.String |
getEMailAddress()
gets the email address of the owner. |
java.util.Date |
getEndTime()
gets the end time of the session. |
long |
getId()
gets the session id. |
java.lang.String |
getInfo()
gets the session description. |
java.util.Date |
getLastTime()
gets the time the announcement of this session was heard. |
com.sun.multicast.advertising.Media[] |
getMedia()
gets the array of media. |
java.lang.String |
getName()
gets the session name. |
java.net.InetAddress |
getOriginAddress()
gets the address of the announcer. |
java.lang.String |
getOwner()
gets the owner name. |
java.lang.String |
getPhone()
gets the phone number of the owner. |
java.util.Date |
getStartTime()
gets the start time of the session. |
java.lang.String |
getUrl()
gets the url. |
long |
getVersion()
gets the version. |
boolean |
removeAdvertisementChangeListener(AdvertisementChangeListener changeListener)
Removes a listener for any change in this Advertisement. |
void |
removeAttribute(java.lang.String s)
removes an attribute. |
void |
setAdvertisedAddress(java.net.InetAddress address)
sets the advertised address. |
void |
setAdvertisedAddress(java.lang.String addrString)
sets the advertised address. |
void |
setAdvertisedTTL(int ttl)
sets the advertised TTL. |
void |
setBandwidth(int bwidth)
sets the session bandwidth. |
void |
setEMailAddress(java.lang.String s)
sets the owner email address. |
void |
setEndTime(java.util.Date end)
sets the end time of the session. |
void |
setEndTime(long end)
sets the end time of the session. |
void |
setId(long id)
sets the id. |
void |
setInfo(java.lang.String s)
sets the session description. |
void |
setMedia(com.sun.multicast.advertising.Media media)
adds a media entry. |
void |
setName(java.lang.String s)
sets the session name. |
void |
setOriginAddress(java.net.InetAddress addr)
sets the originator address. |
void |
setOriginAddress(java.lang.String addrString)
sets the originator address. |
void |
setOwner(java.lang.String s)
sets the owner name. |
void |
setPhone(java.lang.String s)
sets the owner phone number. |
void |
setStartTime(java.util.Date start)
sets the start time of the session. |
void |
setStartTime(long start)
sets the start time of the session. |
void |
setUrl(java.lang.String s)
sets the url associated with the session. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Advertisement(java.net.InetAddress address, int ttl) throws java.net.UnknownHostException
address
- the multicast address to advertisettl
- the time-to-live to use in the AdvertisementMethod Detail |
public long getAdvertisementCount()
public int getCurrentAdvertisementInterval()
public java.util.Date getAdvertisementTimestamp()
public boolean addAdvertisementChangeListener(AdvertisementChangeListener changeListener)
changelistener
- an instance of AdvertisementChangeListenertrue
if the Advertisement exists;
false
otherwisepublic boolean removeAdvertisementChangeListener(AdvertisementChangeListener changeListener)
changelistener
- an instance of AdvertisementChangeListenertrue
if the Advertisement exists;
false
otherwisepublic java.lang.Object clone()
clone
in class java.lang.Object
public long getId()
public long getVersion()
public java.net.InetAddress getOriginAddress()
public java.lang.String getOwner()
public java.lang.String getName()
public java.lang.String getInfo()
public java.lang.String getUrl()
public java.lang.String getEMailAddress()
public java.lang.String getPhone()
public java.util.Date getStartTime()
public java.util.Date getEndTime()
public int getBandwidth()
public java.lang.String[] getAttributes()
public java.util.Date getLastTime()
public java.net.InetAddress getAdvertisedAddress()
public int getAdvertisedTTL()
public com.sun.multicast.advertising.Media[] getMedia()
public void setId(long id)
id
- session id.public void setOriginAddress(java.net.InetAddress addr)
addr
- InetAddress of the originator.public void setOriginAddress(java.lang.String addrString) throws java.net.UnknownHostException
address
- IP address of the originator.public void setOwner(java.lang.String s)
s
- owner name.public void setName(java.lang.String s)
s
- session name.public void setInfo(java.lang.String s)
s
- info about the session.public void setUrl(java.lang.String s)
s
- url associated with the session.public void setEMailAddress(java.lang.String s)
s
- email address.public void setPhone(java.lang.String s)
s
- phone number.public void setStartTime(java.util.Date start)
start
- start time.public void setStartTime(long start)
start
- start time (NTP time).public void setEndTime(java.util.Date end)
end
- end time.public void setEndTime(long end)
end
- end time (NTP time).public void setBandwidth(int bwidth)
bwidth
- the bandwidth of the sessionpublic void addAttribute(java.lang.String s)
s
- session attribute to addpublic void removeAttribute(java.lang.String s)
s
- session attribute to removepublic void setAdvertisedAddress(java.net.InetAddress address)
address
- advertised addresspublic void setAdvertisedAddress(java.lang.String addrString) throws java.net.UnknownHostException
addrString
- advertised addresspublic void setAdvertisedTTL(int ttl)
ttl
- time-to-live for this Advertisementpublic void setMedia(com.sun.multicast.advertising.Media media)
media
- Media object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.