Package com.verisign.epp.framework
Class EPPByteArrayDispatcher
java.lang.Object
com.verisign.epp.framework.EPPByteArrayDispatcher
A Singleton class that delegates message assembly to an EPPAssembler then
routes messages to the appropriate EPPEventHandler.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic EPPByteArrayDispatcherGets the one and only instance of the EPPByteArrayDispatcherbyte[]processMessage(byte[] aInputBytes, Object aData) Creates anEPPMessage, sends the message to the appropriateEPPEventHandler, and then returns the response as abytearray.voidregisterHandler(EPPEventHandler aHandler) Registers anEPPEvenHandlerfor notification of Events.voidsetAssembler(EPPByteArrayAssembler aByteArrayAssembler) Sets the ByteArrayAssembler.byte[]toBytes(EPPMessage aMessage) Encodes an EPP message to abytearray.byte[]toBytes(EPPMessage aMessage, Object aData) Encodes an EPP message to abytearray.
-
Method Details
-
getInstance
Gets the one and only instance of the EPPByteArrayDispatcher- Returns:
- Dispatcher The dispatcher
-
setAssembler
Sets the ByteArrayAssembler.- Parameters:
aByteArrayAssembler- The ByteArrayAssembler to use.
-
processMessage
public byte[] processMessage(byte[] aInputBytes, Object aData) throws EPPEventException, EPPAssemblerException Creates anEPPMessage, sends the message to the appropriateEPPEventHandler, and then returns the response as abytearray.- Parameters:
aInputBytes- The byte array containing the xml inputaData- Any additional data that may be required by the EPPEventHandler- Returns:
bytearray containing the response to the message.- Throws:
EPPEventException- Exception related to the handling of an eventEPPAssemblerException- Exception related to the assembling/de-assembling of messages.EPPAssemberException.isFatalcan be called to determine if the exception is a fatal exception for the client session.
-
registerHandler
Registers anEPPEvenHandlerfor notification of Events.- Parameters:
aHandler- TheEPPEventhandlerto register
-
toBytes
Encodes an EPP message to abytearray.- Parameters:
aMessage- EPP Message to send to the client- Returns:
- Encoded
aMessageas abyte[]. - Throws:
EPPAssemblerException- Error encoding the EPP message
-
toBytes
Encodes an EPP message to abytearray.- Parameters:
aMessage- EPP Message to send to the clientaData- Any additional data that may be required by the handler.- Returns:
- Encoded
aMessageas abyte[]. - Throws:
EPPAssemblerException- Error encoding the EPP message
-