EPP 0.4.9

com.neulevel.epp.transport
Class EppMessageUtil

java.lang.Object
  extended by com.neulevel.epp.transport.EppMessageUtil

public class EppMessageUtil
extends java.lang.Object

This EppSessionUtil class contains some utility methods for handling message exchanges between an EPP Server and an EPP Client.

Version:
$Revision: 1.3 $ $Date: 2006/04/03 20:18:49 $
Author:
Ning Zhang ning.zhang@neustar.com

Field Summary
static java.lang.String eppMessageSize
          Property for handling the size of an EPP message.
 
Constructor Summary
EppMessageUtil()
           
 
Method Summary
static boolean getEppMessageSizeFetchFlag()
          Gets the flag for extracting the size of an incoming EPP message
static boolean getEppMessageSizeWriteFlag()
          Gets the flag for outputing the size of an outgoing EPP message
static java.lang.String getEppPayload(java.io.InputStream in)
          Gets the EPP message payload from an input stream
static int getTimeout()
          Gets the timeout values in seconds.
static void putEppPayload(java.io.OutputStream out, java.lang.String str)
          Sends out an outgoing EPP message
static java.lang.String send(java.net.Socket socket, java.lang.String str)
          Sends a string over a socket and reads a string back from the socket
static void setEppMessageSizeFlags(boolean write, boolean fetch)
          Sets the flags for handling EPP message size
static void setTimeout(int seconds)
          Sets the timeout values in seconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eppMessageSize

public static final java.lang.String eppMessageSize
Property for handling the size of an EPP message. This property could be used to enable/disable the processing of EPP message length, specified for backward compatibility for EPP TCP transport mapping. Two boolean flags can be specified via the property, each of them can be separated by a delimit char ",". For example:

-Dcom.neulevel.epp.transport.EppMessageUtil.eppMessageSize=+output,-fetch

The default values of the property is: +output,+fetch

See Also:
Constant Field Values
Constructor Detail

EppMessageUtil

public EppMessageUtil()
Method Detail

setEppMessageSizeFlags

public static void setEppMessageSizeFlags(boolean write,
                                          boolean fetch)
Sets the flags for handling EPP message size


getEppMessageSizeWriteFlag

public static boolean getEppMessageSizeWriteFlag()
Gets the flag for outputing the size of an outgoing EPP message


getEppMessageSizeFetchFlag

public static boolean getEppMessageSizeFetchFlag()
Gets the flag for extracting the size of an incoming EPP message


setTimeout

public static void setTimeout(int seconds)
Sets the timeout values in seconds. The default value is 0, which means there will be no timeout.


getTimeout

public static int getTimeout()
Gets the timeout values in seconds. The default value is 0, which means there will be no timeout.


putEppPayload

public static void putEppPayload(java.io.OutputStream out,
                                 java.lang.String str)
                          throws java.io.IOException
Sends out an outgoing EPP message

Parameters:
out - the OutputStream object to which the EPP message payload is sent
str - the string to be sent out
Throws:
java.io.IOException

send

public static java.lang.String send(java.net.Socket socket,
                                    java.lang.String str)
                             throws java.io.IOException
Sends a string over a socket and reads a string back from the socket

Parameters:
socket - the socket used for sending the string
str - the string to be sent over the socket
Returns:
a string containing the EPP message payload, or null if there is any error associated with the connection to the server
Throws:
java.io.IOException

getEppPayload

public static java.lang.String getEppPayload(java.io.InputStream in)
                                      throws java.io.IOException
Gets the EPP message payload from an input stream

Parameters:
in - the InputStream object from which the EPP message payload is retrieved
Returns:
a string containing the EPP message payload, or null if there is any error associated with the connection to the server
Throws:
java.io.IOException

EPP 0.4.9

Copyright © 2001-2006 NeuStar, Inc. All Rights Reserved.