EPP 0.2.5

com.neulevel.epp.transport
Class EppChannel

java.lang.Object
  |
  +--com.neulevel.epp.transport.EppChannel
Direct Known Subclasses:
EppChannelTcp

public abstract class EppChannel
extends java.lang.Object

This EppChannel class is designed to handle a channel connected to the EPP server.

Version:
$Revision: 1.1 $ $Date: 2001/11/05 20:20:36 $
Author:
Ning Zhang ning.zhang@neustar.com

Field Summary
protected  int status
          The status of the EppChannel object.
protected static int STATUS_CLOSED
          The status value when the EppChannel object is closed atfer successfully calling the close method
protected static int STATUS_INIT
          The status value when the EppChannel object is created, but not started
protected static int STATUS_START
          The status value when the EppChannel object is started after sucessfully calling the start method
 
Constructor Summary
EppChannel()
           
 
Method Summary
 java.lang.Exception getException()
          Gets the last exception received for the EPP Channel
 java.lang.String getMessage()
          Gets the last message received for the EPP Channel
 EppSession getSession()
          Gets the EppSession object associated with the EPP Channel
abstract  EppGreeting hello()
          Sends an EPP Hello message to the EPP Server and returns back with an EppGreeting object
abstract  EppResponse send(EppCommand command)
          Sends an EppCommand object to the EPP Server and gets an EppResponse object back from the EPP Server
 void setException(java.lang.Exception e)
          Sets the current exception received for the EPP Channel
 void setMessage(java.lang.String message)
          Sets the current message received for the EPP Channel
 void setSession(EppSession session)
          Sets the EppSession object associated with the EPP Channel
abstract  EppResponse start(EppCommandLogin login)
          Starts up the EppChannel by sending an EppCommandLogin object to the EPP Server
abstract  EppResponse terminate()
          Terminates an EPP Channel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_INIT

protected static final int STATUS_INIT
The status value when the EppChannel object is created, but not started

STATUS_START

protected static final int STATUS_START
The status value when the EppChannel object is started after sucessfully calling the start method

STATUS_CLOSED

protected static final int STATUS_CLOSED
The status value when the EppChannel object is closed atfer successfully calling the close method

status

protected int status
The status of the EppChannel object. It is used for recording the status transition from STATUS_INIT to STATUS_START, and finally to STATUS_CLOSED
Constructor Detail

EppChannel

public EppChannel()
Method Detail

getSession

public EppSession getSession()
Gets the EppSession object associated with the EPP Channel

setSession

public void setSession(EppSession session)
Sets the EppSession object associated with the EPP Channel
Parameters:
session - the EppSession used for creating the channel

setMessage

public void setMessage(java.lang.String message)
Sets the current message received for the EPP Channel

getMessage

public java.lang.String getMessage()
Gets the last message received for the EPP Channel

getException

public java.lang.Exception getException()
Gets the last exception received for the EPP Channel

setException

public void setException(java.lang.Exception e)
Sets the current exception received for the EPP Channel

start

public abstract EppResponse start(EppCommandLogin login)
Starts up the EppChannel by sending an EppCommandLogin object to the EPP Server
Parameters:
login - the EppCommandLogin object for establisging the EPP Channel
Returns:
an EppResponse object indicating if the channel is started successfully or not

hello

public abstract EppGreeting hello()
Sends an EPP Hello message to the EPP Server and returns back with an EppGreeting object
Returns:
an EppGreeting returned by the EPP Server, or null if there is any error

terminate

public abstract EppResponse terminate()
Terminates an EPP Channel
Returns:
an EppResponse object indicating if the channel is terminated successfully or not

send

public abstract EppResponse send(EppCommand command)
Sends an EppCommand object to the EPP Server and gets an EppResponse object back from the EPP Server
Parameters:
command - the command to be send to the EPP server
Returns:
an EppResponse object, or null if there is error with the connection to the server

EPP 0.2.5

Copyright © 2001-2002 NeuLevel, Inc. All Rights Reserved.