|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.semoa.service.AbstractService de.fhg.igd.atlas.core.LSClientServiceImpl
Provides the functionality of the Location Server Client
(LSClient
) which allows a user to
register and lookup locations of mobile objects.
LSClientService
,
LSClient
Field Summary | |
static String |
C_ALG
The algorithm used to encrypt LSP messages within globalRegisterEncrypted . |
static int |
C_STRENGTH
The strengh of the cipher which is used to encrypt LSP messages within globalRegisterEncrypted . |
protected String |
cipherAlgorithm_
The reference to the cipher algorithm (see C_ALG ). |
private static String[] |
DEPEND_
The dependencies to other objects in the global
Environment . |
protected KeyGenerator |
keygen_
The reference to the key generator (see C_ALG ). |
private static Logger |
log_
The Logger instance for this class |
protected int |
maximumSize_
The maximum size of reply pakets which are accepted in return to a sent request message of the LSP. |
protected AlgorithmParameters |
parameters_
The cipher parameters (see C_ALG ). |
protected AlgorithmParameterGenerator |
pargen_
The reference to the parameter generator (see C_ALG ). |
protected ProxyInfo |
proxyInfo_
The reference to an instance of LSProxy , |
protected boolean |
securityOptions_
This flag is set, when it's possible to use registerEncrypted and
registerEncoded , which
need special security algorithms. |
protected ServerInfo |
serverInfo_
The reference to an instance of LSServer , |
protected ShipService |
ship_
The reference to the ShipService service. |
Fields inherited from class de.fhg.igd.semoa.service.AbstractService |
REV_POSTFIX, REV_PREFIX |
Fields inherited from interface de.fhg.igd.atlas.core.LSClientService |
WHATIS_PREFIX |
Constructor Summary | |
LSClientServiceImpl()
Creates an instance of this class with the given parameters. |
Method Summary | |
String |
author()
Returns the String with the author's name. |
String[] |
dependencies()
Returns the dependencies of this service as described in Service . |
LSPReply |
globalLookup(byte[] implicitName)
Lookups the given implicitName
on the corresponding LSServer
(see LSPLookup ). |
LSPReply |
globalLookup(LSPLookup lookup)
Processes the given lookup request
on the corresponding LSServer . |
LSPReply |
globalRefresh(LSPRefresh refresh)
Processes the given refresh request
on the corresponding LSServer . |
LSPReply |
globalRefresh(SortedSet implicitNames)
Refreshes the given implicitNames
on the corresponding LSServer
(see LSPRefresh ). |
LSPReply |
globalRegister(byte[] implicitName,
URL contactAddress,
byte[] newCookie,
byte[] currentCookie)
Registers the given implicitName
and contactAddress on the
corresponding LSServer
(see LSPRegister ). |
LSPReply |
globalRegister(LSPRegister register)
Processes the given register request
on the corresponding LSServer . |
LSPReply |
globalRegisterEncoded(byte[] implicitName,
URL contactAddress,
byte[] newCookie,
byte[] currentCookie)
Registers the given implicitName
and contactAddress on the corresponding
LSServer using encoding of the request
(see LSPRegisterEncoded ). |
LSPReply |
globalRegisterEncoded(LSPRegister register)
Processes the given register encoded request
on the corresponding LSServer
using encoding of the request. |
LSPReply |
globalRegisterEncrypted(byte[] implicitName,
URL contactAddress,
byte[] newCookie,
byte[] currentCookie)
Registers the given implicitName
and contactAddress on the corresponding
LSServer using encryption of the request
(see LSPRegisterEncrypted ). |
LSPReply |
globalRegisterEncrypted(LSPRegister register)
Processes the given register encrypted request
on the corresponding LSServer
using encryption of the request. |
LSPReply |
globalRegisterPlain(byte[] implicitName,
URL contactAddress,
byte[] newCookie,
byte[] currentCookie)
Registers the given implicitName
and contactAddress on the corresponding
LSServer
(see LSPRegisterPlain ). |
LSPReply |
globalRegisterPlain(LSPRegister register)
Processes the given register plain request
on the corresponding LSServer . |
String |
info()
Returns the String with the service's short description. |
protected boolean |
initLSInfrastructure(String configFile)
Initialize the location service infrastructure of distributed LS-Servers by parsing the given configuration file. |
protected boolean |
initLSInfrastructure(URL configLdapServer)
Initialize the location service infrastructure of distributed LS-Servers by requesting the configuration from a LDAP server with the given URL. |
AgentContext |
localLookup(AgentCard card)
Lookups the given agent card
on the local SeMoA system. |
AgentContext |
localLookup(byte[] implicitName)
Lookups the given implicitName
on the local SeMoA system. |
AgentContext |
localLookup(LSPLookup lookup)
Processes the given lookup request
on the local SeMoA system. |
SortedSet |
localLookupAll()
Lookups all agents on the local SeMoA system. |
protected URL |
localURL()
Return the URL for the local agent server, used as contact address for local agents. |
LSPReply |
lookup(byte[] implicitName)
Lookups the given implicitName on the local SeMoA system,
on an existing LSProxy and/or the corresponding
LSServer in following manner
(see LSPLookup ). |
LSPReply |
lookup(LSPLookup lookup)
Processes the given lookup request
on the local SeMoA system, on an existing LSProxy
and/or the corresponding LSServer in following manner
(see LSPLookup ). |
LSPReply |
proxyInvalidate(byte[] implicitName)
Invalidates the given implicitName
on the LSProxy
(see LSPProxyInvalidate ). |
LSPReply |
proxyInvalidate(LSPProxyInvalidate invalidate)
Processes the given invalidate request
on the LSProxy . |
LSPReply |
proxyLookup(byte[] implicitName)
Lookups the given implicitName
on the LSProxy
(see LSPLookup ). |
LSPReply |
proxyLookup(LSPLookup lookup)
Processes the given lookup request
on the LSProxy . |
LSPReply |
proxyRefresh(LSPRefresh refresh)
Processes the given refresh request
on the LSProxy . |
LSPReply |
proxyRefresh(Set implicitNames)
Refreshes the given implicitNames
on the LSProxy
(see LSPRefresh ). |
LSPReply |
proxyRegisterPlain(byte[] implicitName,
URL contactAddress,
byte[] newCookie,
byte[] currentCookie)
Registers the given implicitName
and contactAddress on the LSProxy
(see LSPRegisterPlain ). |
LSPReply |
proxyRegisterPlain(LSPRegister register)
Processes the given register plain request
on the LSProxy . |
LSPReply |
register(byte[] implicitName,
URL contactAddress,
byte[] newCookie,
byte[] currentCookie)
Registers the given implicitName and
contactAddress on an existing LSProxy
and/or the corresponding LSServer in following manner
(see LSPRegister ). |
LSPReply |
register(LSPRegister register)
Processes the given register request on an
existing LSProxy and/or the corresponding
LSServer in following manner
(see LSPRegister ). |
String |
revision()
Returns the revision number of this class as a string. |
boolean |
securityAvailable()
Returns the availability of encryption and encoding what needs special cryptographic algorithms. |
protected LSPReply |
sendRequest(LSPRequest request,
URL url)
Sends the given request to the LSProxy
or LSServer with the given url and
waits for a reply. |
protected void |
setCipherAlgorithm(String alg,
int strength)
Initializes the given cipher algorithm alg
with the given strength and sets the internal
variables pargen_ and keygen_ . |
String |
toString()
|
Methods inherited from class de.fhg.igd.semoa.service.AbstractService |
checkDependencies, docs, doPrivileged, doPrivileged, getACC, getEnvironment, majorVersion, minorVersion |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static Logger log_
Logger
instance for this class
private static final String[] DEPEND_
Environment
.
public static final String C_ALG
globalRegisterEncrypted
.
public static final int C_STRENGTH
globalRegisterEncrypted
.
protected String cipherAlgorithm_
C_ALG
).
protected KeyGenerator keygen_
C_ALG
).
protected AlgorithmParameterGenerator pargen_
C_ALG
).
protected AlgorithmParameters parameters_
C_ALG
).
protected boolean securityOptions_
registerEncrypted
and
registerEncoded
, which
need special security algorithms.
protected ShipService ship_
ShipService
service.
protected ServerInfo serverInfo_
LSServer
,
protected ProxyInfo proxyInfo_
LSProxy
,
protected int maximumSize_
Constructor Detail |
public LSClientServiceImpl()
filename
is null
,
no server will be initialized.
Method Detail |
protected boolean initLSInfrastructure(String configFile)
configFile
is null
,
no server will be initialized.
configFile
- The name the configuration file
containing the configuration of the location service infrastructure.
protected boolean initLSInfrastructure(URL configLdapServer)
configLdapServer
is null
,
no server will be initialized.
configLdapServer
- The URL of the ldap server
maintaining the configuration of the location service infrastructure.
public String info()
info
in interface Service
info
in class AbstractService
public String author()
author
in interface Service
author
in class AbstractService
public String revision()
revision
in class AbstractService
public String[] dependencies()
Service
.
dependencies
in interface Service
dependencies
in class AbstractService
public String toString()
toString
in class AbstractService
protected URL localURL()
InternetAddress.getLocalHost
,
including "lsp" as protocol identifier, the local host as
IP address, but no port address.
If the URL could not be resolved due to Exceptions
caused by network missconfiguration, a dummy URL
of the following format will be returned:
error://unknown
protected void setCipherAlgorithm(String alg, int strength) throws NoSuchAlgorithmException, IllegalArgumentException, NullPointerException
alg
with the given strength
and sets the internal
variables pargen_
and keygen_
.
alg
- The cipher algorithm to intitialize.
NoSuchAlgorithmException
- if alg
could not be initialized.
IllegalArgumentException
- if strength
< 1 (RuntimeException).
NullPointerException
- if alg
is
null
(RuntimeException).public boolean securityAvailable()
true
if secure register requests can be
handled; false
otherwise.protected LSPReply sendRequest(LSPRequest request, URL url)
request
to the LSProxy
or LSServer
with the given url
and
waits for a reply.
In addition to the regular replies from the LSProxy
or LSPServer
,
replies with the following states can be returned to sender in
case of an error, which has been occured during request encoding
or message transmission:
INTERNAL_CLIENT_ERROR
IO_ERROR
request
- The request.url
- The destination URL of a LSProxy
or LSServer
public LSPReply globalLookup(LSPLookup lookup)
lookup
request
on the corresponding LSServer
.
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(LSPLookupResult
body)
IMPLICIT_NAME_NOT_FOUND
(no body)
WRONG_VERSION
(no body)
REQUEST_TYPE_INVALID
(no body)
REQUEST_BODY_INVALID
(no body)
INTERNAL_CLIENT_ERROR
(no body)
IO_ERROR
(no body)
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
lookup
- The lookup request.
public LSPReply globalLookup(byte[] implicitName)
implicitName
on the corresponding LSServer
(see LSPLookup
).
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(LSPLookupResult
body)
IMPLICIT_NAME_NOT_FOUND
(no body)
WRONG_VERSION
(no body)
REQUEST_TYPE_INVALID
(no body)
REQUEST_BODY_INVALID
(no body)
INTERNAL_CLIENT_ERROR
(no body)
IO_ERROR
(no body)
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
implicitName
- The implicit name.
public LSPReply globalRegisterPlain(LSPRegister register)
register
plain request
on the corresponding LSServer
.
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
register
- The register plain request.
public LSPReply globalRegisterPlain(byte[] implicitName, URL contactAddress, byte[] newCookie, byte[] currentCookie)
implicitName
and contactAddress
on the corresponding
LSServer
(see LSPRegisterPlain
).
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
implicitName
- The implicit name.contactAddress
- The contact address.newCookie
- The new cookie.currentCookie
- The current cookie
public LSPReply globalRegisterEncrypted(LSPRegister register) throws InvalidAlgorithmParameterException, GeneralSecurityException, BadNameException
register
encrypted request
on the corresponding LSServer
using encryption of the request.
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
ENCRYPTING_NOT_SUPPORTED
ENCRYPTED_DATA_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface without encryption, otherwise the request is
send over the internet.
register
- The register encrypted request.
InvalidAlgorithmParameterException
- if the secret key for
bulk data encryption of the request cannot be generated successfully.
GeneralSecurityException
- if some cipher operation fails.
BadNameException
- if the issuer name in server's
certificate cannot be parsed.public LSPReply globalRegisterEncrypted(byte[] implicitName, URL contactAddress, byte[] newCookie, byte[] currentCookie) throws InvalidAlgorithmParameterException, GeneralSecurityException, BadNameException
implicitName
and contactAddress
on the corresponding
LSServer
using encryption of the request
(see LSPRegisterEncrypted
).
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
ENCRYPTING_NOT_SUPPORTED
ENCRYPTED_DATA_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface without encryption, otherwise the request is
send over the internet.
implicitName
- The implicit name.contactAddress
- The contact address.newCookie
- The new cookie.currentCookie
- The current cookie
InvalidAlgorithmParameterException
- if the secret key for
bulk data encryption of the request cannot be generated successfully.
GeneralSecurityException
- if some cipher operation fails.
BadNameException
- if the issuer name in server's
certificate cannot be parsed.public LSPReply globalRegisterEncoded(LSPRegister register) throws GeneralSecurityException
register
encoded request
on the corresponding LSServer
using encoding of the request.
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
ENCODING_NOT_SUPPORTED
ENCODING_DATA_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface without encoding, otherwise the request is
send over the internet.
register
- The register encoded request.
GeneralSecurityException
- if an error occurs while
generating the message authentification code.public LSPReply globalRegisterEncoded(byte[] implicitName, URL contactAddress, byte[] newCookie, byte[] currentCookie) throws GeneralSecurityException
implicitName
and contactAddress
on the corresponding
LSServer
using encoding of the request
(see LSPRegisterEncoded
).
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
ENCRYPTING_NOT_SUPPORTED
ENCRYPTED_DATA_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface without encoding, otherwise the request is
send over the internet.
implicitName
- The implicit name.contactAddress
- The contact address.newCookie
- The new cookie.currentCookie
- The current cookie
GeneralSecurityException
- if an error occurs while
generating the message authentification code.public LSPReply globalRefresh(LSPRefresh refresh)
refresh
request
on the corresponding LSServer
.
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(no body)
SOME_IMPLICIT_NAMES_NOT_PRESENT
(LSPRefreshResult
body)
If an error occures on client side during the request is processed,
the CLIENT_ERROR_FLAG
of the reply is set;
if an error occures on server side during the request is processed,
the SERVER_ERROR_FLAG
of the reply is set.
The given request is divided into sub requests:
one request for each LSServer
which has to be contacted.
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
refresh
- The refresh request.
public LSPReply globalRefresh(SortedSet implicitNames)
implicitNames
on the corresponding LSServer
(see LSPRefresh
).
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(no body)
SOME_IMPLICIT_NAMES_NOT_PRESENT
(LSPRefreshResult
body)
If an error occures on client side during the request is processed,
the CLIENT_ERROR_FLAG
of the reply is set;
if an error occures on server side during the request is processed,
the SERVER_ERROR_FLAG
of the reply is set.
The given request is divided into sub requests:
one request for each LSServer
which has to be contacted.
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
implicitNames
- The sorted set of implicit names
of the type byte[]
.
public LSPReply proxyLookup(LSPLookup lookup)
lookup
request
on the LSProxy
.
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(LSPLookupResult
body)
IMPLICIT_NAME_NOT_FOUND
(no body)
WRONG_VERSION
(no body)
REQUEST_TYPE_INVALID
(no body)
REQUEST_BODY_INVALID
(no body)
INTERNAL_CLIENT_ERROR
(no body)
IO_ERROR
(no body)
The SERVER_ERROR_FLAG
of the reply is set,
if the LSProxy
has not found the implicit name
in its internal database and the reply state of the
LSServer
received by the proxy had neither been
ACKNOWLEDGE
nor IMPLICIT_NAME_NOT_FOUND
,
but another error code.
The PROXY_ERROR_FLAG
of the reply is set,
if no proxy is existent within the local LAN.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
lookup
- The lookup request.
public LSPReply proxyLookup(byte[] implicitName)
implicitName
on the LSProxy
(see LSPLookup
).
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(LSPLookupResult
body)
IMPLICIT_NAME_NOT_FOUND
(no body)
WRONG_VERSION
(no body)
REQUEST_TYPE_INVALID
(no body)
REQUEST_BODY_INVALID
(no body)
INTERNAL_CLIENT_ERROR
(no body)
IO_ERROR
(no body)
The SERVER_ERROR_FLAG
of the reply is set,
if the LSProxy
has not found the implicit name
in its internal database and the reply state of the
LSServer
received by the proxy had neither been
ACKNOWLEDGE
nor IMPLICIT_NAME_NOT_FOUND
,
but another error code.
The PROXY_ERROR_FLAG
of the reply is set,
if no proxy is existent within the local LAN.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
implicitName
- The implicit name.
public LSPReply proxyRegisterPlain(LSPRegister register)
register
plain request
on the LSProxy
.
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
The SERVER_ERROR_FLAG
of the reply is set,
if the reply state of the LSServer
received by
the proxy had been an IO_ERROR
.
The PROXY_ERROR_FLAG
of the reply is set,
if no proxy is existent within the local LAN.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
register
- The register plain request.
public LSPReply proxyRegisterPlain(byte[] implicitName, URL contactAddress, byte[] newCookie, byte[] currentCookie)
implicitName
and contactAddress
on the LSProxy
(see LSPRegisterPlain
).
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
The SERVER_ERROR_FLAG
of the reply is set,
if the reply state of the LSServer
received by
the proxy had been an IO_ERROR
.
The PROXY_ERROR_FLAG
of the reply is set,
if no proxy is existent within the local LAN.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
implicitName
- The implicit name.contactAddress
- The contact address.newCookie
- The new cookie.currentCookie
- The current cookie
public LSPReply proxyRefresh(LSPRefresh refresh)
refresh
request
on the LSProxy
.
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(no body)
SOME_IMPLICIT_NAMES_NOT_PRESENT
(LSPRefreshResult
body)
WRONG_VERSION
(no body)
REQUEST_TYPE_INVALID
(no body)
REQUEST_BODY_INVALID
(no body)
INTERNAL_CLIENT_ERROR
(no body)
IO_ERROR
(no body)
The PROXY_ERROR_FLAG
of the reply is set,
if no proxy is existent within the local LAN.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
refresh
- The refresh request.
public LSPReply proxyRefresh(Set implicitNames)
implicitNames
on the LSProxy
(see LSPRefresh
).
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(LSPLookupResult
body)
IMPLICIT_NAME_NOT_FOUND
(no body)
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
The PROXY_ERROR_FLAG
of the reply is set,
if no proxy is existent within the local LAN.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
implicitNames
- The sorted set of implicit names
of the type byte[]
.
public LSPReply proxyInvalidate(LSPProxyInvalidate invalidate)
invalidate
request
on the LSProxy
.
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
The PROXY_ERROR_FLAG
of the reply is set,
if no proxy is existent within the local LAN.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
invalidate
- The invalidate request.
public LSPReply proxyInvalidate(byte[] implicitName)
implicitName
on the LSProxy
(see LSPProxyInvalidate
).
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
The PROXY_ERROR_FLAG
of the reply is set,
if no proxy is existent within the local LAN.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
implicitName
- The implicit name.
public AgentContext localLookup(AgentCard card)
card
on the local SeMoA system.
card
- The agent card.
null
otherwise.public AgentContext localLookup(LSPLookup lookup)
lookup
request
on the local SeMoA system.
lookup
- The lookup request.
null
otherwise.public AgentContext localLookup(byte[] implicitName)
implicitName
on the local SeMoA system.
implicitName
- The implicit name.
null
otherwise.public SortedSet localLookupAll()
byte[]
corresponding to all agents found on the local system.public LSPReply globalRegister(LSPRegister register)
register
request
on the corresponding LSServer
.
Dependent on the value of new cookie and current cooky
it is decided which kind of register request demanded.
In the case of an init request it is tried to register
with globalRegisterEncrypted
, in the case
of update or delete request it is tried to register with
globalRegisterEncoded
. If the security
options aren't available or an error occures during
encryption/encoding on client side respectively
decryption/decoding on server side,
globalRegisterPlain
is used.
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
register
- The register plain request.
public LSPReply globalRegister(byte[] implicitName, URL contactAddress, byte[] newCookie, byte[] currentCookie)
implicitName
and contactAddress
on the
corresponding LSServer
(see LSPRegister
).
Dependent on the value of new cookie and current cooky
it is decided which kind of register request demanded.
In the case of an init request it is tried to register
with globalRegisterEncrypted
, in the case
of update or delete request it is tried to register with
globalRegisterEncoded
. If the security
options aren't available or an error occures during
encryption/encoding on client side respectively
decryption/decoding on server side,
globalRegisterPlain
is used.
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
implicitName
- The implicit name.contactAddress
- The contact address.newCookie
- The new cookie.currentCookie
- The current cookie
public LSPReply register(LSPRegister register)
register
request on an
existing LSProxy
and/or the corresponding
LSServer
in following manner
(see LSPRegister
).
+--proxyRegisterPlain
| |
| +--globalRegisterEncrypted/Encoded
| |
| +--globalRegisterPlain
|
+--globalRegisterEncrypted/Encoded
|
+--globalRegisterPlain
LSProxy
is existent in the local LAN, it is
used to process the register request. The proxy itself forwards
the request to the corresponding LSServer
by
using encryption respectively encoding of the request message if
security options are available, using plain messages otherwise.
If no LSProxy
is existent in the local LAN, the
request is processed directly by the corresponding
LSServer
as described.
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
The SERVER_ERROR_FLAG
of the reply is set,
if the reply state of the LSServer
received by
the proxy had been an IO_ERROR
.
The PROXY_ERROR_FLAG
of the reply is set,
if the reply state of the LSProxy
received by
the client had been an IO_ERROR
.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
register
in interface LSClientService
register
- The register request.
public LSPReply register(byte[] implicitName, URL contactAddress, byte[] newCookie, byte[] currentCookie)
implicitName
and
contactAddress
on an existing LSProxy
and/or the corresponding LSServer
in following manner
(see LSPRegister
).
+--proxyRegisterPlain
| |
| +--globalRegisterEncrypted/Encoded
| |
| +--globalRegisterPlain
|
+--globalRegisterEncrypted/Encoded
|
+--globalRegisterPlain
LSProxy
is existent in the local LAN, it is
used to process the register request. The proxy itself forwards
the request to the corresponding LSServer
by
using encryption respectively encoding of the request message if
security options are available, using plain messages otherwise.
If no LSProxy
is existent in the local LAN, the
request is processed directly by the corresponding
LSServer
as described.
Following reply
states are possible
(see LSPReply
):
ACKNOWLEDGE
IMPLICIT_NAME_NOT_PRESENT
CONTACT_ADDRESS_NOT_EXISTENT
COOKIE_INVALID
WRONG_VERSION
REQUEST_TYPE_INVALID
REQUEST_BODY_INVALID
INTERNAL_CLIENT_ERROR
IO_ERROR
The SERVER_ERROR_FLAG
of the reply is set,
if the reply state of the LSServer
received by
the proxy had been an IO_ERROR
.
The PROXY_ERROR_FLAG
of the reply is set,
if the reply state of the LSProxy
received by
the client had been an IO_ERROR
.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
In the case that an update request could not be processed succesfully, because the corresponding entry has not been found, it's tried to reinitialize the entry with an init request.
register
in interface LSClientService
implicitName
- The implicit name.contactAddress
- The contact address.newCookie
- The new cookie.currentCookie
- The current cookie
public LSPReply lookup(LSPLookup lookup)
lookup
request
on the local SeMoA system, on an existing LSProxy
and/or the corresponding LSServer
in following manner
(see LSPLookup
).
+--localLookup
|
+--proxyLookup
| |
| +--globalLookup
|
+--globalLookup
If this request was not successful and a LSProxy
is
existent in the local LAN, it is used to process the lookup request.
The proxy itself forwards the request to the corresponding
LSServer
in the case, that the searched entry is not
found on the proxy.
If no LSProxy
is existent in the local LAN, the
request is processed directly by the corresponding
LSServer
as described.
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(LSPLookupResult
body)
IMPLICIT_NAME_NOT_FOUND
(no body)
WRONG_VERSION
(no body)
REQUEST_TYPE_INVALID
(no body)
REQUEST_BODY_INVALID
(no body)
INTERNAL_CLIENT_ERROR
(no body)
IO_ERROR
(no body)
The SERVER_ERROR_FLAG
of the reply is set,
if the reply state of the LSServer
received by
the proxy had been an IO_ERROR
.
The PROXY_ERROR_FLAG
of the reply is set,
if the reply state of the LSProxy
received by
the client had been an IO_ERROR
.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
lookup
in interface LSClientService
lookup
- The register lookup.
public LSPReply lookup(byte[] implicitName)
implicitName
on the local SeMoA system,
on an existing LSProxy
and/or the corresponding
LSServer
in following manner
(see LSPLookup
).
+--localLookup
|
+--proxyLookup
| |
| +--globalLookup
|
+--globalLookup
If this request was not successful and a LSProxy
is
existent in the local LAN, it is used to process the lookup request.
The proxy itself forwards the request to the corresponding
LSServer
in the case, that the searched entry is not
found on the proxy.
If no LSProxy
is existent in the local LAN, the
request is processed directly by the corresponding
LSServer
as described.
Following reply
states and bodies are possible
(see LSPReply
):
ACKNOWLEDGE
(LSPLookupResult
body)
IMPLICIT_NAME_NOT_FOUND
(no body)
WRONG_VERSION
(no body)
REQUEST_TYPE_INVALID
(no body)
REQUEST_BODY_INVALID
(no body)
INTERNAL_CLIENT_ERROR
(no body)
IO_ERROR
(no body)
The SERVER_ERROR_FLAG
of the reply is set,
if the reply state of the LSServer
received by
the proxy had been an IO_ERROR
.
The PROXY_ERROR_FLAG
of the reply is set,
if the reply state of the LSProxy
received by
the client had been an IO_ERROR
.
If the proxy can be found locally, it is accessed directly
through the LSProxyService
interface,
otherwise the request is send within the local LAN.
If the corresponding server can be found locally, it is
accessed directly through the LSServerService
interface, otherwise the request is send over the internet.
lookup
in interface LSClientService
implicitName
- The implicit name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |