Package com.verisign.epp.framework
Class EPPBalanceHandler
java.lang.Object
com.verisign.epp.framework.EPPBalanceHandler
- All Implemented Interfaces:
EPPEventHandler
- Direct Known Subclasses:
BalanceHandler
This class provides an interface for handling EPP Balance Commands in a
Server implementation. EPPEvents are handled by the handleEvent() method here
and routed to the appropriate abstract member function. Subclasses should
override the abstract methods to define the desired behavior of a particular
command when it is received. A subclassed instance of
EPPBalanceHandler should be registered with the EPPDispatcher
so that EPPEvents related to the Balance Mapping will be handled there.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract EPPEventResponsedoBalanceInfo(EPPEvent aEvent, Object aData) Returns theEPPEventResponseback to the client after processing the passed inaEvent.Returns the Balance Namespace associated with this handler.handleEvent(EPPEvent aEvent, Object aData) Returns theEPPEventResponseafter processing the passed inaEvent.protected voidpostHandleEvent(EPPEvent aEvent, Object aData) Handles any common behavior that all Balance commands need to execute after they execute their command specific behavior.protected voidpreHandleEvent(EPPEvent aEvent, Object aData) Handles any common behavior that all Balance commands need to execute before they execute their command specific behavior.
-
Constructor Details
-
EPPBalanceHandler
public EPPBalanceHandler()Construct an instance ofEPPBalanceHandler. Whenever anEPPBalanceHandlerinstance is created it also addsEPPBalanceMapFactoryto theEPPFactorymap factory.
-
-
Method Details
-
getNamespace
Returns the Balance Namespace associated with this handler.- Specified by:
getNamespacein interfaceEPPEventHandler- Returns:
- String the Balance Namespace associated with this handler.
-
handleEvent
Returns theEPPEventResponseafter processing the passed inaEvent. This method receives anEPPEventand routes it to the appropriate abstract method.- Specified by:
handleEventin interfaceEPPEventHandler- Parameters:
aEvent- AnEPPEventthat contains theEPPCommandaData- Any data that a Server needs to send to thisEPPBalanceHandlerinstance.- Returns:
- the
EPPEventResponseafter processing the passed inaEvent. - Throws:
EPPEventException- Thrown if an unrecognizedEPPEventis received
-
preHandleEvent
Handles any common behavior that all Balance commands need to execute before they execute their command specific behavior. The default implementation does nothing.- Parameters:
aEvent- TheEPPEventthat is being handledaData- Any data that a Server needs to send to thisEPPBalanceHandler- Throws:
EPPHandleEventException- Thrown if an error condition occurs. It must contain anEPPEventResponse
-
postHandleEvent
Handles any common behavior that all Balance commands need to execute after they execute their command specific behavior. The default implementation does nothing- Parameters:
aEvent- TheEPPEventthat is being handledaData- Any data that a Server needs to send to thisEPPBalanceHandler- Throws:
EPPHandleEventException- Thrown if an error condition occurs. It must contain anEPPEventResponse
-
doBalanceInfo
Returns theEPPEventResponseback to the client after processing the passed inaEvent. Invoked when a Balance Info command is received. Subclasses should define the behavior when a Balance Info command is received.- Parameters:
aEvent- TheEPPEventthat is being handledaData- Any data that a Server needs to send to thisEPPBalanceHandler- Returns:
- the
EPPEventResponseback to the client after processing the passed inaEvent.
-