|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
SHIP (simple host information protocols) provides information on remote SeMoA hosts. The query is based on key-value pairs which are defined by each host. A local component (e.g. an agent or service) may ask for
This service should not be accessible only to trust-worthy agents, since SHIP could be misused for denial-of-service (DoS) or even distributed denial-of-service (DDoS) attacks. You really should ensure this fact in SeMoA's security policy.
Each method has a remote and a local version. The local version
queries the actual host and (surprise, surprise) miss a parameter
URL host. The methods for local retrieval do not rely
on a network infrastructure since the results will be gained by
internal method calls only .
Some of the methods allow wildcards. They are interpreted according
to Java regular expressions defined in the package
java.util.regex.
There are a number of well-known keys that sould be used for SHIP
within a SeMoA server. They are defined as follows:
| Field Summary | |
static String |
WHATIS
The WhatIs entry key for this service. |
| Fields inherited from interface de.fhg.igd.semoa.net.ship.ShipConstants |
COMM_POD_ACL, COMM_POD_URL, COMM_PODS_ACL, COMM_PODS_URL, LOCATION_ADDRESS, LOCATION_CITY, LOCATION_COUNTRY, LOCATION_GPS_LAT, LOCATION_GPS_LONG, LOCATION_ROOM, LOCATION_STATE, LOCATION_ZIP, OWNER_DN, PLATFORM_PURPOSE, TRANSPORT_IN_RAW_MAX, TRANSPORT_IN_RAW_URL, TRANSPORT_IN_RAWS_MAX, TRANSPORT_IN_RAWS_URL |
| Method Summary | |
Set |
getKeySet()
Returns a set of all SHIP keys defined by the local SHIP service. |
Set |
getKeySet(String expr)
Returns a subset of SHIP keys defined by the local SHIP service. |
Set |
getKeySet(String expr,
URL host)
Returns a subset of SHIP keys defined by a remote SHIP service. |
Set |
getKeySet(URL host)
Returns a set of all SHIP keys defined by a remote SHIP service. |
Map |
getMap()
Returns the complete map of key value pairs defined by the local SHIP service. |
Map |
getMap(String expr)
Returns a subset of key value pairs defined by the local SHIP service. |
Map |
getMap(String expr,
URL host)
Returns the a subset of key value pairs by a remote SHIP service. |
Map |
getMap(URL host)
Returns the complete map of key value pairs by a remote SHIP service. |
String |
getValue(String key)
Returns a specific value selected by a given key defined by the local SHIP service. |
String |
getValue(String key,
URL host)
Returns a specific value selected by a given key defined by on a remote SHIP service. |
boolean |
isAlive(URL host)
Checks whether a certain host is alive. |
String |
localDN()
|
URL |
localURL()
|
| Field Detail |
public static final String WHATIS
WhatIs entry key for this service.
| Method Detail |
public boolean isAlive(URL host)
throws ShipException
false. Hence, a negative result may not be
interpreted as if the pinged host is down; the server could
just deny answering SHIP requests.
host - denotes the SHIP port of the host to be queried
ShipException - if access connection to remote SHIP
service fails.
SecurityException - if caller has not the proper permission to invoke lookups
public Set getKeySet(String expr,
URL host)
throws ShipException
expr - allows wildcards to get just a subset of the maphost - denotes denotes the SHIP port of the host to be queried
ShipException - if access connection to remote SHIP
service fails.
SecurityException - if caller has not the proper permission to invoke lookupspublic Set getKeySet(String expr)
expr - allows wildcards to get just a subset of the map
SecurityException - if caller has not the proper permission to invoke lookups
public Set getKeySet(URL host)
throws ShipException
host - denotes denotes the SHIP port of the host to be queried
ShipException - if access connection to remote SHIP
service fails.
SecurityException - if caller has not the proper permission to invoke lookupspublic Set getKeySet()
SecurityException - if caller has not the proper permission to invoke lookups
public String getValue(String key,
URL host)
throws ShipException
key - defines a specific valuehost - denotes the SHIP port of the host to be queried
ShipException - if access connection to remote SHIP
service fails.
SecurityException - if caller has not the proper permission to invoke lookupspublic String getValue(String key)
key - defines a specific value
null otherwise.
SecurityException - if caller has not the proper permission to invoke lookups
public Map getMap(String expr,
URL host)
throws ShipException
expr - allows wildcards to get just a subset of the maphost - denotes the SHIP port of the host to be queried
ShipException - if access connection to remote SHIP
service fails.
SecurityException - if caller has not the proper permission to invoke lookupspublic Map getMap(String expr)
expr - allows wildcards to get just a subset of the map
SecurityException - if caller has not the proper permission to invoke lookups
public Map getMap(URL host)
throws ShipException
getMap(".*", host).
host - denotes the SHIP port of the host to be queried
ShipException - if access connection to remote SHIP
service fails.
SecurityException - if caller has not the proper permission to invoke lookupspublic Map getMap()
getMap(".*")
SecurityException - if caller has not the proper permission to invoke lookupspublic URL localURL()
URL class returned is not java.net.URL.public String localDN()
String
(see KeyMaster.AUTH_KEY).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||