de.fhg.igd.atlas.lsp
Class LSPRefreshResult

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.LSPRefreshResult
All Implemented Interfaces:
ASN1Collection, ASN1CollectionOf, ASN1Type, Cloneable, Collection, List, RandomAccess, Serializable

public class LSPRefreshResult
extends ASN1SetOf

Represents an LSP_Refresh_Result structure of the Location Service Protocol (LSP). Encapsulated in a LSPReply it is sent to the Location Service Client (LSClient) as reply to a LSPRefresh request. This class is used by the Location Sevice Server (LSServer) and Location Service Proxy (LSProxy) to transport the set of implicit names, which couldn't have been refreshed.

The ASN.1 structure of this reply is as follows

 LSP_Refresh_Result ::= 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: LSPRefreshResult.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Peters
See Also:
LSPRefresh, 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
LSPRefreshResult()
          Creates an instance ready for decoding.
LSPRefreshResult(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 entries.
static LSPRefreshResult createReply(byte[] code)
          Creates a new reply from the given encoded reply.
 byte[] getEncoded()
          Returns the DER encoded reply.
 SortedSet getImplicitNames()
          Returns the sorted set of implicit names.
 String toString()
          Returns the string representation of this reply.
 
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

LSPRefreshResult

public LSPRefreshResult()
Creates an instance ready for decoding.


LSPRefreshResult

public LSPRefreshResult(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

createReply

public static LSPRefreshResult createReply(byte[] code)
                                    throws CorruptedCodeException,
                                           IllegalStateException,
                                           NullPointerException
Creates a new reply from the given encoded reply.

Parameters:
code - The encoded reply.
Returns:
The decoded reply.
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 entries.

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 reply.

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

toString

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

Returns:
The string representation.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.