de.fhg.igd.atlas.lsp
Class LSPRefresh

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended bycodec.asn1.ASN1AbstractCollection
                  extended bycodec.asn1.ASN1Set
                      extended bycodec.asn1.ASN1SetOf
                          extended byde.fhg.igd.atlas.lsp.LSPRefresh
All Implemented Interfaces:
ASN1Collection, ASN1CollectionOf, ASN1Type, Cloneable, Collection, List, RandomAccess, Serializable

public class LSPRefresh
extends ASN1SetOf

Represents a LSP_Refresh 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 refresh existing entries specified by a list of implicit names. If successful, the LSPReply message has the state ACKNOWLEDGE, otherwise it transports a LSPRefreshResult structure. This class is used by the Location Service Client (LSClient) to prevent,that the entries in LSServer and LSProxy expire after a certain timeout.

The ASN.1 structure of this request is as follows

 LSP_Refresh      ::= ImplicitNameList
 ImplicitNameList ::= SET OF ImplicitName
 ImplicitName     ::= OCTET STRING
 
The implicit name is the unique identifier of an mobile object for instance the hashcode of its static part.

Version:
"$Id: LSPRefresh.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Peters
See Also:
LSPRefreshResult, LSPRequest, LSPReply, Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
 
Fields inherited from class codec.asn1.ASN1SetOf
 
Fields inherited from class codec.asn1.ASN1AbstractCollection
 
Fields inherited from class java.util.ArrayList
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
LSPRefresh()
          Creates an instance ready for decoding.
LSPRefresh(Set implicitNames)
          Creates an instance with the given set of implicit names.
 
Method Summary
 void add(byte[] implicitName)
          Adds a new implicit name to the existing set of implicit names.
static LSPRefresh createRequest(byte[] code)
          Creates a new request from the given encoded request.
 byte[] getEncoded()
          Returns the DER encoded request.
 SortedSet getImplicitNames()
          Returns the sorted set of implicit names.
 String toString()
          Returns the string representation of this request.
 
Methods inherited from class codec.asn1.ASN1SetOf
decode, getElementType, newElement
 
Methods inherited from class codec.asn1.ASN1Set
getTag
 
Methods inherited from class codec.asn1.ASN1AbstractCollection
checkConstraints, 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 codec.asn1.ASN1Collection
getCollection
 
Methods inherited from interface codec.asn1.ASN1Type
checkConstraints, encode, getConstraint, getTag, getTagClass, getValue, isExplicit, isOptional, isType, setConstraint, setExplicit, setOptional
 
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
 

Constructor Detail

LSPRefresh

public LSPRefresh()
Creates an instance ready for decoding.


LSPRefresh

public LSPRefresh(Set implicitNames)
Creates an instance with the given set of implicit names.

Parameters:
implicitNames - The set of implicit names of the type byte[].
Method Detail

createRequest

public static LSPRefresh createRequest(byte[] code)
                                throws CorruptedCodeException,
                                       IllegalStateException,
                                       NullPointerException
Creates a new request from the given encoded request.

Parameters:
code - The encoded request.
Returns:
The decoded request.
Throws:
CorruptedCodeException - if the code is bad.
IllegalStateException - if an error occurs while decoding with DERDecoder (RuntimeException).
NullPointerException - if code is null (RuntimeException).

add

public void add(byte[] implicitName)
Adds a new implicit name to the existing set of implicit names.

Parameters:
implicitName - The implicit name.

getImplicitNames

public SortedSet getImplicitNames()
Returns the sorted set of implicit names.

Returns:
The sortet set of implicit names of the type byte[].

getEncoded

public byte[] getEncoded()
                  throws IllegalStateException
Returns the DER encoded request.

Returns:
The encoded request.
Throws:
IllegalStateException - if an exception occures during ASN1 encoding (RuntimeException).

toString

public String toString()
Returns the string representation of this request. This is done in following manner
 ASN1StructureName {
 Property  : Value
 }
 

Returns:
The string representation.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.