|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jsdp.util.Address
net.sourceforge.jsdp.util.Resource
public class Resource
A network resource specified in a SDP message.
| Field Summary | |
|---|---|
protected int |
addresses
The number of addresses available for the resource |
protected int |
ttl
The resource TTL |
| Fields inherited from class net.sourceforge.jsdp.util.Address |
|---|
address, addressType, IN, IP4, IP6 |
| Constructor Summary | |
|---|---|
protected |
Resource()
Creates a new Resource. |
|
Resource(String address)
Creates a new Resource. |
|
Resource(String address,
int ttl)
Creates a new Resource. |
|
Resource(String address,
int ttl,
int addresses)
Creates a new Resource. |
| Method Summary | |
|---|---|
Object |
clone()
Returns a clone of this resource. |
int |
getTTL()
Returns the TTL. |
boolean |
hasTTL()
Indicates if the resource has a TTL. |
void |
removeTTL()
Clears the resource's TTL. |
void |
setAddresses(int addresses)
Sets the number of addresses of the resource. |
void |
setTTL(int ttl)
Sets the resource TTL. |
String |
toString()
Returns a string representation of the resource. |
| Methods inherited from class net.sourceforge.jsdp.util.Address |
|---|
equals, getAddress, getAddressType, isFQDN, isFQDN, isIPAddress, setAddress |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int ttl
protected int addresses
| Constructor Detail |
|---|
protected Resource()
public Resource(String address)
throws SDPException
address - the resource address. The address may contains ttl and the
number of addresses too
SDPException - if the resource informations are not valid
public Resource(String address,
int ttl)
throws SDPException
address - the resource address. The address cannot contains ttl and
the number of addressesttl - The resource ttl
SDPException - if the resource informations are not valid
public Resource(String address,
int ttl,
int addresses)
throws SDPException
address - the resource address. The address cannot contains ttl and
the number of addressesttl - the resource ttladdresses - the number of addresses available for the resource
SDPException - if the resource informations are not valid| Method Detail |
|---|
public Object clone()
clone in class Addresspublic int getTTL()
public boolean hasTTL()
public void removeTTL()
public void setAddresses(int addresses)
throws SDPException
addresses - the number of addresses
SDPException - if the number of addesses is negative
public void setTTL(int ttl)
throws SDPException
ttl - the TTL
SDPException - if the TTL is minor than 1 or greater than 255public String toString()
toString in class Address
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||