com.solers.slp
Class ServiceURL

java.lang.Object
  |
  +--com.solers.slp.ServiceURL
All Implemented Interfaces:
Serializable

public class ServiceURL
extends Object
implements Serializable

Implementation of the SLP ServiceURL class defined in RFC 2614.

Author:
Patrick Callis
See Also:
Serialized Form

Field Summary
private  AuthenticationBlock[] _authBlocks
           
private  String _host
           
private  int _lifetime
           
private  String _path
           
private  int _port
           
private  String _transport
           
private  ServiceType _type
           
private  String _url
           
static int LIFETIME_DEFAULT
           
static int LIFETIME_MAXIMUM
           
static int LIFETIME_NONE
           
static int LIFETIME_PERMANENT
           
static int NO_PORT
           
 
Constructor Summary
(package private) ServiceURL()
           
  ServiceURL(String URL, int lifetime)
           
 
Method Summary
(package private)  int calcSize()
           
 boolean equals(Object obj)
           
private  byte[] getAuthData(String spi, int timestamp)
           
 String getHost()
           
 int getLifetime()
           
 int getPort()
           
 ServiceType getServiceType()
           
 String getTransport()
           
 String getURLPath()
           
 int hashCode()
           
private  void parse()
           
(package private)  void readExternal(DataInput in)
           
 void setServiceType(ServiceType type)
           
(package private)  void sign()
           
 String toString()
           
(package private)  boolean verify()
           
(package private)  void writeExternal(DataOutput out)
           
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

NO_PORT

public static final int NO_PORT

LIFETIME_NONE

public static final int LIFETIME_NONE

LIFETIME_DEFAULT

public static final int LIFETIME_DEFAULT

LIFETIME_MAXIMUM

public static final int LIFETIME_MAXIMUM

LIFETIME_PERMANENT

public static final int LIFETIME_PERMANENT

_url

private String _url

_lifetime

private int _lifetime

_type

private ServiceType _type

_host

private String _host

_transport

private String _transport

_port

private int _port

_path

private String _path

_authBlocks

private AuthenticationBlock[] _authBlocks
Constructor Detail

ServiceURL

public ServiceURL(String URL,
                  int lifetime)
           throws ServiceLocationException

ServiceURL

ServiceURL()
Method Detail

parse

private void parse()

sign

void sign()
    throws ServiceLocationException

verify

boolean verify()

getAuthData

private byte[] getAuthData(String spi,
                           int timestamp)
                    throws IOException

getServiceType

public ServiceType getServiceType()

setServiceType

public final void setServiceType(ServiceType type)

getTransport

public String getTransport()

getHost

public String getHost()

getPort

public int getPort()

getURLPath

public String getURLPath()

getLifetime

public int getLifetime()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

writeExternal

void writeExternal(DataOutput out)
             throws IOException

readExternal

void readExternal(DataInput in)
            throws IOException

calcSize

int calcSize()