codec.asn1
Class DefinedByResolver
java.lang.Object
|
+--codec.asn1.DefinedByResolver
- All Implemented Interfaces:
- Resolver
- public class DefinedByResolver
- extends Object
- implements Resolver
This interface is used by the ASN1OpenType in order to
resolve the ASN.1 type to decode at runtime. Concrete implementations of this
interface can be used to model references to type classes as well or to
compensate for the superseded ASN.1 ANY DEFINED BY type.
Implementations shall determine and return the correct ASN.1 type to be
decoded in the defined method.
- Version:
- "$Id: DefinedByResolver.java,v 1.2 2000/12/06 17:47:28 vroth Exp $"
- Author:
- Volker Roth
|
Method Summary |
ASN1Type |
resolve(ASN1Type caller)
Looks up the private OID in the private registry and returns the resolved
ASN.1 type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefinedByResolver
public DefinedByResolver(OIDRegistry registry,
ASN1ObjectIdentifier oid)
- Creates an instance that attempts to resolve the given OID against the
given registry upon calling
resolve. The OID instance
used or resolving is the one passed to this constructor. Hence, an OID
can be added to a compound ASN.1 type and an ASN1OpenType can be initialized with this. If the OID is decoded before
the open type then the open type is resolved against the given registry
and the decoded OID. In other words the ASN.1 ANY DEFINED BY type can be
modelled with an ASN1OpenType and an instance of this resolver class.
- Parameters:
registry - The registry to resolve the given OID against.oid - The oid instance to use when resolving.
DefinedByResolver
public DefinedByResolver(ASN1ObjectIdentifier oid)
- Creates an instance that resolves the given OID against the
global OID registry.
- Parameters:
oid - The OID to resolve.
resolve
public ASN1Type resolve(ASN1Type caller)
throws ResolverException
- Looks up the private OID in the private registry and returns the resolved
ASN.1 type. If the OID cannot be resolved against the registry then an
exception is thrown.
- Specified by:
resolve in interface Resolver
- Parameters:
caller - The calling ASN.1 type.- Throws:
ResolverException - if the private OID cannot be mapped onto an ASN.1 type by
the private registry.
Copyright © Fraunhofer Gesellschaft. All Rights Reserved.