org.ws4d.java.service.reference
Interface Reference

All Known Subinterfaces:
DeviceReference, ServiceReference, ServiceReferenceInternal
All Known Implementing Classes:
DefaultDeviceReference, DefaultServiceReference

public interface Reference

Super interface of service and device reference.


Field Summary
static int LOCATION_LOCAL
           
static int LOCATION_REMOTE
           
static int LOCATION_UNKNOWN
           
 
Method Summary
 int getLocation()
          Returns the location of the device or service, which may be - LOCATION_UNKNOWN, - LOCATION_REMOTE, - LOCATION_LOCAL.
 java.lang.String getPreferredCommunicationManagerID()
          Returns the ID of the communication protocol to use when communicating with this reference's target over the current preferred transport address.
 URI getPreferredXAddress()
          Returns the preferred transport address for communication with this reference.
 

Field Detail

LOCATION_UNKNOWN

static final int LOCATION_UNKNOWN
See Also:
Constant Field Values

LOCATION_REMOTE

static final int LOCATION_REMOTE
See Also:
Constant Field Values

LOCATION_LOCAL

static final int LOCATION_LOCAL
See Also:
Constant Field Values
Method Detail

getLocation

int getLocation()
Returns the location of the device or service, which may be - LOCATION_UNKNOWN, - LOCATION_REMOTE, - LOCATION_LOCAL.

Returns:
the location of the device or service

getPreferredXAddress

URI getPreferredXAddress()
                         throws TimeoutException
Returns the preferred transport address for communication with this reference.

Returns:
the preferred transport address for this reference
Throws:
TimeoutException - if no suitable transport address can be detected

getPreferredCommunicationManagerID

java.lang.String getPreferredCommunicationManagerID()
                                                    throws TimeoutException
Returns the ID of the communication protocol to use when communicating with this reference's target over the current preferred transport address. Will return the framework-wide default communication ID, if no preferred transport address has been explicitly set.

Returns:
the ID of the protocol to communicate over with the target of this reference
Throws:
TimeoutException - if no suitable transport address can be detected