org.ws4d.java.client
Class SearchParameter

java.lang.Object
  extended by org.ws4d.java.client.SearchParameter

public class SearchParameter
extends java.lang.Object

A collection of search criteria used when searching for devices or services.

See Also:
SearchManager

Field Summary
static byte MODE_LOCAL
           
static byte MODE_LOCAL_AND_REMOTE
           
static byte MODE_REMOTE
           
 
Constructor Summary
SearchParameter()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 QNameSet getDeviceTypes()
          Gets device port types of device to discover.
 java.lang.Object getReferenceObject()
          Gets reference object.
 ProbeScopeSet getScopes()
          Gets list of scopes of device to discover.
 SearchMap getSearchMap()
          Returns the search map to use when discovering devices and services.
 byte getSearchMode()
          Returns the configured search mode.
 QNameSet getServiceTypes()
          Gets service port types of service to discover.
 int hashCode()
           
 void setDeviceTypes(QNameSet deviceTypes)
          Sets device port types of device to discover.
 void setReferenceObject(java.lang.Object referenceObject)
          Sets reference object.
 void setScopes(ProbeScopeSet scopes)
          Sets list of scopes of device to discover.
 void setSearchMap(SearchMap searchMap)
          Sets the search map for the discovery process.
 void setSearchMode(byte searchMode)
          Sets the desired search mode.
 void setServiceTypes(QNameSet serviceTypes)
          Sets service port types of service to discover.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MODE_LOCAL

public static final byte MODE_LOCAL
See Also:
Constant Field Values

MODE_REMOTE

public static final byte MODE_REMOTE
See Also:
Constant Field Values

MODE_LOCAL_AND_REMOTE

public static final byte MODE_LOCAL_AND_REMOTE
See Also:
Constant Field Values
Constructor Detail

SearchParameter

public SearchParameter()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSearchMode

public byte getSearchMode()
Returns the configured search mode. If not explicitly set vie setSearchMode(byte), the default search mode MODE_LOCAL_AND_REMOTE is returned.

The search mode defines whether to search only local devices and services, only remote devices and services or both based on this SearchParameter instance.

Returns:
the search mode to use
See Also:
setSearchMode(byte), MODE_LOCAL, MODE_REMOTE, MODE_LOCAL_AND_REMOTE

setSearchMode

public void setSearchMode(byte searchMode)
Sets the desired search mode.

Parameters:
searchMode - the search mode to set
See Also:
getSearchMode(), MODE_LOCAL, MODE_REMOTE, MODE_LOCAL_AND_REMOTE

getSearchMap

public SearchMap getSearchMap()
Returns the search map to use when discovering devices and services.

Returns:
the search map for the search process

setSearchMap

public void setSearchMap(SearchMap searchMap)
Sets the search map for the discovery process.

Parameters:
searchMap - the search map to use, if null, a default search map will be used

getDeviceTypes

public QNameSet getDeviceTypes()
Gets device port types of device to discover.

Returns:
device port type.

setDeviceTypes

public void setDeviceTypes(QNameSet deviceTypes)
Sets device port types of device to discover.

Parameters:
deviceTypes - device port types.

getScopes

public ProbeScopeSet getScopes()
Gets list of scopes of device to discover.

Returns:
list of scopes.

setScopes

public void setScopes(ProbeScopeSet scopes)
Sets list of scopes of device to discover.

Parameters:
scopes - list of scopes.

getServiceTypes

public QNameSet getServiceTypes()
Gets service port types of service to discover.

Returns:
service port types.

setServiceTypes

public void setServiceTypes(QNameSet serviceTypes)
Sets service port types of service to discover. If no device filters are set, all devices are discovered. Later on the discovered services all filtered.

Parameters:
serviceTypes - service port types.

getReferenceObject

public java.lang.Object getReferenceObject()
Gets reference object.

Returns:
reference object.

setReferenceObject

public void setReferenceObject(java.lang.Object referenceObject)
Sets reference object. The reference object can include data, which is important for the further handling of the discovered devices or services.

Parameters:
referenceObject -

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object