com.verisign.epp.serverstub

## Class BalanceHandler

- java.lang.Object
- - com.verisign.epp.framework.EPPBalanceHandler
  - - com.verisign.epp.serverstub.BalanceHandler

- All Implemented Interfaces:
    EPPEventHandler

      public class BalanceHandler
      extends EPPBalanceHandler

  The `BalanceHandler` class is a concrete implementation of the abstract `com.verisign.epp.framework.EPPBalanceHandler` class. It defines the Server's response to all received EPP Balance Commands.
  See Also:
    `EPPEvent`, `EPPEventResponse`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BalanceHandler()` Constructs an instance of BalanceHandler

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected EPPEventResponse` | `doBalanceInfo(EPPEvent aEvent, java.lang.Object aData)` Invoked when a Balance Info command is received.
    `protected void` | `postHandleEvent(EPPEvent aEvent, java.lang.Object aData)` Handles any common behavior that all Balance commands need to execute after they execute their command specific behavior.
    `protected void` | `preHandleEvent(EPPEvent aEvent, java.lang.Object aData)` Handles any common behavior that all Balance commands need to execute before they execute their command specific behavior.

    - ### Methods inherited from class com.verisign.epp.framework.EPPBalanceHandler

      `getNamespace, handleEvent`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BalanceHandler

          public BalanceHandler()

      Constructs an instance of BalanceHandler

  - ### Method Detail

    - #### preHandleEvent

          protected void preHandleEvent(EPPEvent aEvent,
                                        java.lang.Object aData)
                                 throws EPPHandleEventException

      Handles any common behavior that all Balance commands need to execute before they execute their command specific behavior.
      Overrides:
        `preHandleEvent` in class `EPPBalanceHandler`
      Parameters:
        `aEvent` - The `EPPEvent` that is being handled
        `aData` - Any data that a Server needs to send to this `EPPBalanceHandler` This is assumed to be an instance of SessionData here.
      Throws:
        `EPPHandleEventException` - Thrown if an error condition occurs. It must contain an `EPPEventResponse`

    - #### postHandleEvent

          protected void postHandleEvent(EPPEvent aEvent,
                                         java.lang.Object aData)
                                  throws EPPHandleEventException

      Handles any common behavior that all Balance commands need to execute after they execute their command specific behavior.
      Overrides:
        `postHandleEvent` in class `EPPBalanceHandler`
      Parameters:
        `aEvent` - The `EPPEvent` that is being handled
        `aData` - Any data that a Server needs to send to this `EPPBalanceHandler`
      Throws:
        `EPPHandleEventException` - Thrown if an error condition occurs. It must contain an `EPPEventResponse`

    - #### doBalanceInfo

          protected EPPEventResponse doBalanceInfo(EPPEvent aEvent,
                                                   java.lang.Object aData)

      Invoked when a Balance Info command is received.
      Specified by:
        `doBalanceInfo` in class `EPPBalanceHandler`
      Parameters:
        `aEvent` - The `EPPEvent` that is being handled
        `aData` - Any data that a Server needs to send to this `EPPDomaindHandler`
      Returns:
        EPPEventResponse The response that should be sent back to the client.