Class JxtaUtil
- java.lang.Object
-
- com.sun.enterprise.mgmt.transport.jxta.JxtaUtil
-
public class JxtaUtil extends java.lang.ObjectUtility class that can be used by any calling code to do common routines- Author:
- shreedhar ganapathy
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_SEND_RETRIES
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidappendChild(net.jxta.document.StructuredDocument adv, net.jxta.document.Element child)static voidconfigureJxtaLogging()static byte[]createByteArrayFromObject(java.lang.Object object)static JxtaNetworkManagerProxygetNetworkManagerProxy(java.lang.String groupName)static <T> TgetObjectFromByteArray(net.jxta.endpoint.MessageElement element)static voidprintMessageStats(net.jxta.endpoint.Message msg, boolean verbose)Prints message element names and content and some statsstatic booleansend(net.jxta.pipe.OutputPipe pipe, net.jxta.endpoint.Message msg)Sendmsgoverpipe.static voidsetLogger(java.util.logging.Logger logger)static voidsetupLogHandler()
-
-
-
Field Detail
-
MAX_SEND_RETRIES
public static final int MAX_SEND_RETRIES
- See Also:
- Constant Field Values
-
-
Method Detail
-
createByteArrayFromObject
public static byte[] createByteArrayFromObject(java.lang.Object object)
-
getObjectFromByteArray
public static <T> T getObjectFromByteArray(net.jxta.endpoint.MessageElement element)
-
setLogger
public static void setLogger(java.util.logging.Logger logger)
-
setupLogHandler
public static void setupLogHandler()
-
printMessageStats
public static void printMessageStats(net.jxta.endpoint.Message msg, boolean verbose)Prints message element names and content and some stats- Parameters:
msg- message to printverbose- indicates whether to print elment content
-
getNetworkManagerProxy
public static JxtaNetworkManagerProxy getNetworkManagerProxy(java.lang.String groupName) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
appendChild
public static void appendChild(net.jxta.document.StructuredDocument adv, net.jxta.document.Element child)
-
configureJxtaLogging
public static void configureJxtaLogging()
-
send
public static boolean send(net.jxta.pipe.OutputPipe pipe, net.jxta.endpoint.Message msg) throws java.io.IOExceptionSendmsgoverpipe.- Parameters:
pipe- the output pipemsg- the message- Returns:
- boolean
trueif the message has been sent otherwisefalse.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:
java.io.IOException- the exception
-
-