public class JxtaUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SEND_RETRIES |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendChild(net.jxta.document.StructuredDocument adv,
net.jxta.document.Element child) |
static void |
configureJxtaLogging() |
static byte[] |
createByteArrayFromObject(Object object) |
static JxtaNetworkManagerProxy |
getNetworkManagerProxy(String groupName) |
static <T> T |
getObjectFromByteArray(net.jxta.endpoint.MessageElement element) |
static void |
printMessageStats(net.jxta.endpoint.Message msg,
boolean verbose)
Prints message element names and content and some stats
|
static boolean |
send(net.jxta.pipe.OutputPipe pipe,
net.jxta.endpoint.Message msg)
Send
msg over pipe. |
static void |
setLogger(Logger logger) |
static void |
setupLogHandler() |
public static final int MAX_SEND_RETRIES
public static byte[] createByteArrayFromObject(Object object)
public static <T> T getObjectFromByteArray(net.jxta.endpoint.MessageElement element)
public static void setLogger(Logger logger)
public static void setupLogHandler()
public static void printMessageStats(net.jxta.endpoint.Message msg,
boolean verbose)
msg - message to printverbose - indicates whether to print elment contentpublic static JxtaNetworkManagerProxy getNetworkManagerProxy(String groupName) throws IllegalArgumentException
IllegalArgumentExceptionpublic static void appendChild(net.jxta.document.StructuredDocument adv,
net.jxta.document.Element child)
public static void configureJxtaLogging()
public static boolean send(net.jxta.pipe.OutputPipe pipe,
net.jxta.endpoint.Message msg)
throws IOException
msg over pipe.pipe - the output pipemsg - the messagetrue 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.IOException - the exceptionCopyright © 2017–2020 Eclipse Foundation. All rights reserved.