public class Utils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Utils.ORBRunThread
Thread para execução do
ORB.run() |
static class |
Utils.ShutdownThread
Thread de finalização do ORB que pode ser incluída no
Runtime.addShutdownHook(Thread) para realizar limpezas necessárias |
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
chain2str(tecgraf.openbus.CallerChain chain)
Converte uma cadeia para uma representação textual.
|
static Codec |
createCodec(ORB orb)
Constrói uma instância de
Codec |
static String |
file2IOR(String iorfile)
Lê um arquivo de IOR e retorna a linha que representa o IOR
|
static byte[] |
readFile(String path)
Lê todo um arquivo e retorna como um array de bytes.
|
static Properties |
readPropertyFile(String fileName)
Lê um arquivo de propriedades.
|
static void |
setLibLogLevel(Level level)
Configua o nível de log da biblioteca de acesso openbus
|
static void |
setLogLevel(Logger logger,
Level level)
Configura o nível de log
|
static void |
setTestLogLevel(Level level)
Configua o nível de log dos testes de interoperabilidade
|
public static Properties readPropertyFile(String fileName) throws IOException
fileName - o nome do arquivo.IOExceptionpublic static byte[] readFile(String path) throws IOException
path - arquivo a ser lido.IOExceptionpublic static void setTestLogLevel(Level level)
level - nível do logpublic static void setLibLogLevel(Level level)
level - nível do logpublic static void setLogLevel(Logger logger, Level level)
logger - logger a ser configuradolevel - nível do log.public static String chain2str(tecgraf.openbus.CallerChain chain)
chain - a cadeiapublic static Codec createCodec(ORB orb) throws UnknownEncoding, InvalidName
Codecorb - o ORBCodecUnknownEncodingInvalidNamepublic static String file2IOR(String iorfile) throws IOException
iorfile - path para arquivoIOExceptionCopyright © 2016. All rights reserved.