Class CommonUtils
java.lang.Object
services.moleculer.util.CommonUtils
Common utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final byte[]compress(byte[] data, int level) static final voidconvertAnnotations(io.datatree.Tree config, Annotation[] annotations) static final byte[]decompress(byte[] data) static final ParseResultextractStream(io.datatree.Tree data) static final StringformatNamoSec(long nanoSec) static final StringformatNumber(Number number) static final StringformatPath(String path) static final ObjectgetFieldFromProxy(Object object, Field field) static final Stringstatic final Stringstatic final StringgetHostOrIP(boolean preferHostname, io.datatree.Tree info) static final io.datatree.TreegetNodeInfos(ServiceBroker broker, Transporter transporter) static final io.datatree.TreemergeMeta(io.datatree.Tree rsp, io.datatree.Tree req) static final Stringstatic final Stringstatic final Stringstatic final ParseResultparseParams(Object[] params) static final String[]static final byte[]readFully(InputStream in) static final io.datatree.TreereadTree(InputStream in, String format) static final io.datatree.Treestatic final io.datatree.TreeremoveLocalEvents(io.datatree.Tree descriptor) static final longresolveUnit(String string) static final voidsuggestDependency(String groupId, String artifactId, String version) static final FastBuildTreethrowableToTree(String id, String nodeID, String protocolVersion, Throwable error)
-
Constructor Details
-
CommonUtils
public CommonUtils()
-
-
Method Details
-
mergeMeta
public static final io.datatree.Tree mergeMeta(io.datatree.Tree rsp, io.datatree.Tree req) -
getFieldFromProxy
-
throwableToTree
public static final FastBuildTree throwableToTree(String id, String nodeID, String protocolVersion, Throwable error) -
formatPath
-
suggestDependency
-
convertAnnotations
public static final void convertAnnotations(io.datatree.Tree config, Annotation[] annotations) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException -
formatNumber
-
formatNamoSec
-
getNodeInfos
-
removeLocalEvents
public static final io.datatree.Tree removeLocalEvents(io.datatree.Tree descriptor) -
getHostOrIP
-
getHostName
-
parseURLs
-
extractStream
-
parseParams
-
nameOf
-
nameOf
-
nameOf
-
readTree
-
readTree
- Throws:
Exception
-
readFully
- Throws:
IOException
-
getFormat
-
compress
- Throws:
IOException
-
decompress
- Throws:
IOExceptionDataFormatException
-
resolveUnit
- Throws:
NumberFormatException
-