Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.verisign.epp.framework
Class EPPByteArrayDispatcher

    java.lang.Object
      com.verisign.epp.framework.EPPByteArrayDispatcher

    public class EPPByteArrayDispatcher

extends java.lang.Object

A Singleton class that delegates message assembly to an EPPAssembler then routes messages to the appropriate EPPEventHandler.

Version:
  1.0 Dec 04, 2006
Author:
  Srikanth Veeramachaneni
See Also:
  `EPPEventHandler`, `EPPEvent`

Method Summary
`static EPPByteArrayDispatcher` | `getInstance()` Gets the one and only instance of the EPPByteArrayDispatcher
`byte[]` | `processMessage(byte[] aInputBytes, java.lang.Object aData)` Creates an `EPPMessage`, sends the message to the appropriate `EPPEventHandler`, and then returns the response as a `byte` array.
`void` | `registerHandler(EPPEventHandler aHandler)` Registers an `EPPEvenHandler` for notification of Events.
`void` | `setAssembler(EPPByteArrayAssembler aByteArrayAssembler)` Sets the ByteArrayAssembler.
`byte[]` | `toBytes(EPPMessage aMessage)` Encodes an EPP message to a `byte` array.
`byte[]` | `toBytes(EPPMessage aMessage, java.lang.Object aData)` Encodes an EPP message to a `byte` array.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static EPPByteArrayDispatcher getInstance()

  Gets the one and only instance of the EPPByteArrayDispatcher

  Returns:
    Dispatcher The dispatcher

### setAssembler

    public void setAssembler(EPPByteArrayAssembler aByteArrayAssembler)

  Sets the ByteArrayAssembler.

  Parameters:
    `aByteArrayAssembler` - The ByteArrayAssembler to use.

### processMessage

    public byte[] processMessage(byte[] aInputBytes,
                                 java.lang.Object aData)
                          throws EPPEventException,
                                 EPPAssemblerException

  Creates an `EPPMessage`, sends the message to the appropriate `EPPEventHandler`, and then returns the response as a `byte` array.

  Parameters:
    `aInputBytes` - The byte array containing the xml input
    `aData` - Any additional data that may be required by the EPPEventHandler
  Throws:
    `EPPEventException` - Exception related to the handling of an event
    `EPPAssemblerException` - Exception related to the assembling/de-assembling of messages. `EPPAssemberException.isFatal` can be called to determine if the exception is a fatal exception for the client session.

### registerHandler

    public void registerHandler(EPPEventHandler aHandler)

  Registers an `EPPEvenHandler` for notification of Events.

  Parameters:
    `aHandler` - The `EPPEventhandler` to register

### toBytes

    public byte[] toBytes(EPPMessage aMessage)
                   throws EPPAssemblerException

  Encodes an EPP message to a `byte` array.

  Parameters:
    `aMessage` - EPP Message to send to the client
  Throws:
    `EPPAssemblerException` - Error encoding the EPP message

### toBytes

    public byte[] toBytes(EPPMessage aMessage,
                          java.lang.Object aData)
                   throws EPPAssemblerException

  Encodes an EPP message to a `byte` array.

  Parameters:
    `aMessage` - EPP Message to send to the client
  Throws:
    `EPPAssemblerException` - Error encoding the EPP message

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © VeriSign Inc. All Rights Reserved.