public class TelemeeJavaClient extends Object implements Serializable
Example usage:
TelemeeJavaClient tj = new TelemeeJavaClient();
tj.init();
tj.setLogLevel(TelemeeJavaClient.INFO);
TelemeeApp TEST_APP_01 = new TelemeeApp("Testapp 01");
Channel TEST_CHANNEL_01 = new Channel("Testchannel 01");
ChannelAttribute TEST_CHANNELATTRIBUTE_X = new ChannelAttribute("X");
ChannelAttribute TEST_CHANNELATTRIBUTE_Y = new ChannelAttribute("Y");
tj.forTelemeeApp(TEST_APP_01)
.forChannel(TEST_CHANNEL_01)
.forChannelAttribute(TEST_CHANNELATTRIBUTE_X)
.log(123)
.forChannelAttribute(TEST_CHANNELATTRIBUTE_Y)
.log(456)
.endLogEntry()
.send();
| Modifier and Type | Field and Description |
|---|---|
static int |
ALL |
static int |
FINE |
static int |
FINER |
static int |
FINEST |
static int |
INFO |
static int |
OFF |
static int |
SEVERE |
static int |
WARNING |
| Constructor and Description |
|---|
TelemeeJavaClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Clear internal cache of TelemeeJavaClient.
|
void |
deleteChannel(Channel channelToDelete)
Deletes a Channel on the server.
|
void |
deleteChannelAttribute(ChannelAttribute channelAttributeToDelete)
Deletes a ChannelAttribute on the server.
|
void |
deleteLogEntries(Channel channel)
Deletes a LogEntries of a given channel on the server.
|
void |
deleteTelemeeApp(TelemeeApp telemeeAppToDelete)
Deletes a TelemeeApp on the server.
|
void |
destroy()
Destroy client for cleanup.
|
TelemeeJavaClient |
endLogEntry()
Define the end of a logEntry.
|
TelemeeJavaClient |
forChannel(Channel channel)
Define the current channel.
|
TelemeeJavaClient |
forChannelAttribute(ChannelAttribute channelAttribute)
Define the current channelAttribute.
|
TelemeeJavaClient |
forTelemeeApp(TelemeeApp telemeeApp)
Define the current telemeeApp.
|
String |
getBaseURI()
Get base URI to server.
|
Channel |
getChannel(String name)
Get Channel by name.
|
Collection<ChannelAttribute> |
getChannelAttributes()
Get all ChannelAttributes.
|
Collection<Channel> |
getChannels()
Get all Channels.
|
Long |
getLogEntriesCount(Channel channel)
Get count of logEntries of a channel.
|
int |
getLogLevel()
Get logLevel.
|
Collection<TelemeeApp> |
getTelemeeApps()
Get all TelemeeApps from the TelemeeJavaClient-Chache.
|
int |
getThreadPoolSize()
Get the threadpoolsize in the restclient (for asynchronous creation of
logEntries).
|
void |
init()
Initializes TelemeeJavaClient with the default base-URI
http://localhost:8080.
|
void |
init(String baseURI)
Initializes TelemeeJavaClient with the given base-URI.
|
TelemeeJavaClient |
log(boolean value)
Create a logValue of type boolean for a started logEntry.
|
TelemeeJavaClient |
log(char value)
Create a logValue of type char for a started logEntry.
|
TelemeeJavaClient |
log(char[] value)
Create a logValue of type char[] for a started logEntry.
|
TelemeeJavaClient |
log(double value)
Create a logValue of type double for a started logEntry.
|
TelemeeJavaClient |
log(float value)
Create a logValue of type float for a started logEntry.
|
TelemeeJavaClient |
log(int value)
Create a logValue of type int for a started logEntry.
|
TelemeeJavaClient |
log(long value)
Create a logValue of type long for a started logEntry.
|
TelemeeJavaClient |
log(Object value)
Create a logValue of type String for a started logEntry.
|
TelemeeJavaClient |
log(String value)
Create a logValue of type String for a started logEntry.
|
void |
send()
Send all TelemeeApps, Channels, ChannelAttributes, Bindings and LogEntries
to the Server.
|
void |
sendAsync()
Send all TelemeeApps, Channels, ChannelAttributes, Bindings and LogEntries
to the Server.
|
void |
setBaseURI(String baseURI)
Set base URI to server.
|
void |
setLogLevel(int logLevel)
Set logLevel.
|
void |
setThreadPoolSize(int threadPoolSize)
Set the threadpoolsize in the restclient (for asynchronous creation of
logEntries).
|
TelemeeJavaClient |
startLogEntry(String description,
int logLevel)
Define the start of an new logEntry.
|
void |
waitTillAllIsDone()
Wait until all asynchronous sended logEntries are done.
|
public static final int OFF
public static final int SEVERE
public static final int WARNING
public static final int INFO
public static final int FINE
public static final int FINER
public static final int FINEST
public static final int ALL
public void init()
public void init(String baseURI)
baseURI - public int getThreadPoolSize()
public void setThreadPoolSize(int threadPoolSize)
threadPoolSize - public void destroy()
public String getBaseURI()
public void setBaseURI(String baseURI)
baseURI - public int getLogLevel()
public void setLogLevel(int logLevel)
logLevel - public void deleteTelemeeApp(TelemeeApp telemeeAppToDelete)
telemeeAppToDelete - public void deleteChannel(Channel channelToDelete)
channelToDelete - public void deleteChannelAttribute(ChannelAttribute channelAttributeToDelete)
channelAttributeToDelete - public void deleteLogEntries(Channel channel)
channel - public Collection<TelemeeApp> getTelemeeApps()
public Collection<Channel> getChannels()
public Collection<ChannelAttribute> getChannelAttributes()
public TelemeeJavaClient forTelemeeApp(TelemeeApp telemeeApp)
telemeeApp - the telemeeApppublic TelemeeJavaClient forChannel(Channel channel)
channel - public TelemeeJavaClient forChannelAttribute(ChannelAttribute channelAttribute)
channelAttribute - public Long getLogEntriesCount(Channel channel)
channel - public TelemeeJavaClient startLogEntry(String description, int logLevel)
description - logLevel - public TelemeeJavaClient log(String value)
value - public TelemeeJavaClient log(Object value)
value - public TelemeeJavaClient log(boolean value)
value - public TelemeeJavaClient log(char value)
value - public TelemeeJavaClient log(char[] value)
value - public TelemeeJavaClient log(double value)
value - public TelemeeJavaClient log(float value)
value - public TelemeeJavaClient log(int value)
value - public TelemeeJavaClient log(long value)
value - public TelemeeJavaClient endLogEntry()
public Channel getChannel(String name)
name - public void clearCache()
public void waitTillAllIsDone()
public void send()
public void sendAsync()
Copyright © 2014 Thomas Struller-Baumann. All Rights Reserved.