com.objsys.asn1j.runtime
Class Asn1NamedEventDispatcher

java.lang.Object
  extended by com.objsys.asn1j.runtime.Asn1NamedEventDispatcher
All Implemented Interfaces:
Asn1NamedEventHandler

public class Asn1NamedEventDispatcher
extends java.lang.Object
implements Asn1NamedEventHandler


Constructor Summary
Asn1NamedEventDispatcher()
           
 
Method Summary
 void addNamedEventHandler(Asn1NamedEventHandler handler)
          This method adds a named event handler to the named event handler list
 void characters(java.lang.String svalue, short typeCode)
          The characters callback method is invoked when content (primitive data) is encountered.
 void endElement(java.lang.String name, int index)
          The endElement callback method is invoked when the end of an element within a constructed type (SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE) is detected.
 int getEventHandlerListCount()
          This method returns number of event handlers in the event handler list
 boolean hasEventHandlers()
          This method returns true if there are event handlers to dispatch events to.
 void startElement(java.lang.String name, int index)
          The startElement callback method is invoked when the start of an element within a constructed type (SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE) is encountered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Asn1NamedEventDispatcher

public Asn1NamedEventDispatcher()
Method Detail

addNamedEventHandler

public void addNamedEventHandler(Asn1NamedEventHandler handler)
This method adds a named event handler to the named event handler list

Parameters:
handler - Asn1NamedEventHandler object to be added

getEventHandlerListCount

public int getEventHandlerListCount()
This method returns number of event handlers in the event handler list

Returns:
number of handlers in the event handler list.

hasEventHandlers

public final boolean hasEventHandlers()
This method returns true if there are event handlers to dispatch events to.

Returns:
true if there are event handlers to dispatch to

characters

public void characters(java.lang.String svalue,
                       short typeCode)
Description copied from interface: Asn1NamedEventHandler
The characters callback method is invoked when content (primitive data) is encountered. A stringified representation of the parsed value is returned.

Specified by:
characters in interface Asn1NamedEventHandler
Parameters:
svalue - Stringified representation of the parsed value. The representation will be in ASN.1 value format.
typeCode - Identifier specifying the type of the parsed data variable. The enumerated list of values that might appear here is provided in the the Asn1Type class (see the documentation on this class for a full list of the names).

endElement

public void endElement(java.lang.String name,
                       int index)
Description copied from interface: Asn1NamedEventHandler
The endElement callback method is invoked when the end of an element within a constructed type (SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE) is detected.

Specified by:
endElement in interface Asn1NamedEventHandler
Parameters:
name - Name of the parsed element.
index - Index of element in array. Only used for SEQUENCE OF or SET OF elements. Set to -1 for all others.

startElement

public void startElement(java.lang.String name,
                         int index)
Description copied from interface: Asn1NamedEventHandler
The startElement callback method is invoked when the start of an element within a constructed type (SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE) is encountered.

Specified by:
startElement in interface Asn1NamedEventHandler
Parameters:
name - Name of the parsed element.
index - Index of element in array. Only used for SEQUENCE OF or SET OF elements. Set to -1 for all others.