de.fhg.igd.atlas.lsp
Class LSPListResult

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

public class LSPListResult
extends ASN1SetOf

Represents an LSP_List_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 LSPList request. This class is used by the Location Sevice Server (LSServer) and Location Service Proxy (LSProxy) to transport the set of requested entries.

The ASN.1 structure of this reply is as follows

 LSP_List_Result ::= EntryList
 EntryList       ::= SET OF Entry
 EntryName       ::= LSP_Entry
 

Version:
"$Id: LSPListResult.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Peters
See Also:
LSPList, LSPEntry, 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
LSPListResult()
          Creates an instance ready for decoding.
LSPListResult(Set entries)
          Creates an instance with the given set of entries.
 
Method Summary
 void add(LSPEntry entry)
          Adds a new entry to the existing set of entries.
static LSPListResult createReply(byte[] code)
          Creates a new reply from the given encoded reply.
 byte[] getEncoded()
          Returns the DER encoded reply.
 Set getEntries()
          Returns the set of entries.
 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

LSPListResult

public LSPListResult()
Creates an instance ready for decoding.


LSPListResult

public LSPListResult(Set entries)
Creates an instance with the given set of entries.

Parameters:
entries - The set of entries of the type LSPEntry.
Method Detail

createReply

public static LSPListResult 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(LSPEntry entry)
Adds a new entry to the existing set of entries.

Parameters:
entry - The entry.

getEntries

public Set getEntries()
Returns the set of entries.

Returns:
The set of entries of the type LSPEntry.

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.