|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
codec.asn1.ASN1AbstractCollection
codec.asn1.ASN1Sequence
de.fhg.igd.atlas.lsp.LSPRegisterPlain
Represents an LSP_RegisterPlain structure of the Location Service
Protocol (LSP).
Encapsulated in a LSPRequest it is sent to the Location
Service Server (LSServer)
or the Location Service Proxy
(LSProxy) to initialize,
update or delete an entry. If successful, the LSPReply
message has the result state ACKNOWLEDGE. This class is
used by the Location Sevice Client
(LSClient) to send plain
register messages.
The ASN.1 structure of this request is as follows
LSP_RegisterPlain ::= SEQUENCE
{
implicitName ImplicitName,
contactaddress ContactAddress,
newCookie Cookie,
currentCookie Cookie
}
ImplicitName ::= OCTET STRING
ContactAddress ::= OCTET STRING
Cookie ::= OCTET STRING
The implicit name is the unique identifier of an mobile object
for instance the hashcode of its static part. The contact address
should consist of a URL string that specifies the protocol, address,
and port of a management service provided by the server, which is in
possession of the specified object. The current cookie is used as
authorisation mechanism by the LS-Server and LS-Proxy permitting a
LSClient to update or delete an existing entry. The new
cookie represents the authorisation code for the next registration.
To distinguish between initialization, update and deletion a special
NULL_COOKIE
is used as follows:
if (currentCookie == NULL_COOKIE){ Initialize a new entry }
if (newCookie == NULL_COOKIE){ Delete the existing entry }otherwise update the existing entry
LSPRequest,
LSPReply,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class java.util.AbstractList |
|
| Field Summary | |
protected ASN1OctetString |
contactAddress_
The contact address of this request. |
protected ASN1OctetString |
currentCookie_
The current cookie of this request. |
protected ASN1OctetString |
implicitName_
The implicit name of this request. |
protected ASN1OctetString |
newCookie_
The new cookie of this request. |
| Fields inherited from class codec.asn1.ASN1AbstractCollection |
|
| Fields inherited from class java.util.ArrayList |
|
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
LSPRegisterPlain()
Creates an instance ready for decoding. |
|
LSPRegisterPlain(byte[] implicitName,
URL contactAddress,
byte[] newCookie,
byte[] currentCookie)
Creates an instance with the given parameters implicit name, contact address, new cookie and current cookie. |
|
| Method Summary | |
static LSPRegisterPlain |
createRequest(byte[] code)
Creates a new request from the given encoded request. |
URL |
getContactAddress()
Returns the contact address or an empty URL, if the encoded contact address is not well-formed. |
byte[] |
getCurrentCookie()
Returns the current cookie. |
byte[] |
getEncoded()
Returns the DER encoded request. |
byte[] |
getImplicitName()
Returns the implicit name. |
byte[] |
getNewCookie()
Returns the new cookie. |
String |
toString()
Returns the string representation of this request. |
| Methods inherited from class codec.asn1.ASN1Sequence |
getTag |
| Methods inherited from class codec.asn1.ASN1AbstractCollection |
checkConstraints, decode, encode, getCollection, getConstraint, getTagClass, getValue, isExplicit, isOptional, isType, setConstraint, setExplicit, setOptional |
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
| Field Detail |
protected ASN1OctetString implicitName_
protected ASN1OctetString contactAddress_
protected ASN1OctetString newCookie_
protected ASN1OctetString currentCookie_
| Constructor Detail |
public LSPRegisterPlain()
public LSPRegisterPlain(byte[] implicitName,
URL contactAddress,
byte[] newCookie,
byte[] currentCookie)
implicitName - The implicit name.contactAddress - The contact address.newCookie - The new cookie.currentCookie - The current cookie| Method Detail |
public static LSPRegisterPlain createRequest(byte[] code)
throws CorruptedCodeException,
IllegalStateException,
NullPointerException
code - The encoded request.
CorruptedCodeException - if the code is bad.
IllegalStateException - if an error occurs
while decoding with DERDecoder (RuntimeException).
NullPointerException - if code
is null (RuntimeException).public byte[] getImplicitName()
getImplicitName in interface LSPRegisterpublic URL getContactAddress()
getContactAddress in interface LSPRegisterpublic byte[] getNewCookie()
getNewCookie in interface LSPRegisterpublic byte[] getCurrentCookie()
getCurrentCookie in interface LSPRegister
public byte[] getEncoded()
throws IllegalStateException
IllegalStateException - if an exception occures
during ASN1 encoding (RuntimeException).public String toString()
ASN1StructureName {
Property : Value
}
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||