com.sun.enterprise.mgmt.transport.jxta
Class JxtaUtil

java.lang.Object
  extended by com.sun.enterprise.mgmt.transport.jxta.JxtaUtil

public class JxtaUtil
extends Object

Utility class that can be used by any calling code to do common routines

Author:
shreedhar ganapathy

Field Summary
static int MAX_SEND_RETRIES
           
 
Method Summary
static void appendChild(StructuredDocument adv, Element child)
           
static void configureJxtaLogging()
           
static byte[] createByteArrayFromObject(Object object)
           
static JxtaNetworkManagerProxy getNetworkManagerProxy(String groupName)
           
static
<T> T
getObjectFromByteArray(MessageElement element)
           
static void printMessageStats(Message msg, boolean verbose)
          Prints message element names and content and some stats
static boolean send(OutputPipe pipe, Message msg)
          Send msg over pipe.
static void setLogger(Logger logger)
           
static void setupLogHandler()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SEND_RETRIES

public static final int MAX_SEND_RETRIES
See Also:
Constant Field Values
Method Detail

createByteArrayFromObject

public static byte[] createByteArrayFromObject(Object object)

getObjectFromByteArray

public static <T> T getObjectFromByteArray(MessageElement element)

setLogger

public static void setLogger(Logger logger)

setupLogHandler

public static void setupLogHandler()

printMessageStats

public static void printMessageStats(Message msg,
                                     boolean verbose)
Prints message element names and content and some stats

Parameters:
msg - message to print
verbose - indicates whether to print elment content

getNetworkManagerProxy

public static JxtaNetworkManagerProxy getNetworkManagerProxy(String groupName)
                                                      throws IllegalArgumentException
Throws:
IllegalArgumentException

appendChild

public static void appendChild(StructuredDocument adv,
                               Element child)

configureJxtaLogging

public static void configureJxtaLogging()

send

public static boolean send(OutputPipe pipe,
                           Message msg)
                    throws IOException
Send msg over pipe.

Parameters:
pipe -
msg -
Returns:
boolean true if the message has been sent otherwise false. false. is commonly returned for non-error related congestion, meaning that you should be able to send the message after waiting some amount of time.
Throws:
IOException


Copyright © 2012. All Rights Reserved.