public class ClientConnectionData extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
static int |
API_TRACE_INDEX
The index for API trace.
|
String[] |
applicationNames
The application names.
|
static int |
CLIENT_TRACE_INDEX
The index for Client trace.
|
InetAddress |
clientAddress
The address of the client.
|
Date |
connectionTime
The time that the client connected to the server.
|
static int |
HOST_TRACE_INDEX
The index for Host trace.
|
InetAddress |
hostAddress
The current host address (of the current host session).
|
String |
language
The language used on the client (or null if not defined).
|
String |
luName
The current host LU name (of the current host session).
|
static int |
TELNET_TRACE_INDEX
The index for Telnet trace.
|
static int |
TRACE_BIT_BINARY
The trace level bits.
|
static int |
TRACE_BIT_VERBOSE
The trace level bits for verbose trace.
|
byte[] |
traceLevels
The trace levels of the subsystems telnet, host, client, API.
|
String |
userID
The user ID at the client, may be null if user authentication
is not used.
|
Constructor and Description |
---|
ClientConnectionData(InetAddress clientAddress)
The constructor initiates the trace levels to defaults, i.e.
|
ClientConnectionData(InetAddress clientAddress,
String userID)
The constructor initiates the trace levels to defaults, i.e.
|
ClientConnectionData(long connectionID,
byte[] defaultTrace,
InetAddress clientAddress,
String userID)
The constructor initiates the trace levels to defaults, i.e.
|
Modifier and Type | Method and Description |
---|---|
ClientConnectionData |
createClone()
Creates a copy of an instance of the client connection data.
|
boolean |
doAPIBinaryTrace()
Checks if API binary trace is on.
|
boolean |
doAPIVerboseTrace()
Checks if API verbose trace is on.
|
boolean |
doClientBinaryTrace()
Checks if Client binary trace is on.
|
boolean |
doClientVerboseTrace()
Checks if Client verbose trace is on.
|
boolean |
doHostBinaryTrace()
Checks if Host binary trace is on.
|
boolean |
doHostVerboseTrace()
Checks if Host verbose trace is on.
|
boolean |
doTelnetBinaryTrace()
Checks if Telnet binary trace is on.
|
boolean |
doTelnetVerboseTrace()
Checks if Telnet verbose trace is on.
|
String |
getApplicationNames()
Gets the application names (space separated).
|
long |
getConnectionID()
Gets the connection ID.
|
String |
getConnectionIDString()
Gets the connection ID as a string.
|
static String |
getConnectionIDString(ClientConnectionData clientConnectionData)
Gets the connection ID as a string.
|
static String |
getConnectionIDString(ClientConnectionData clientConnectionData,
String threadName,
String threadID)
Gets the connection ID as a string.
|
int |
getConnectionTimeInSeconds()
Calculates current connection time in seconds.
|
EventFilter |
getEventFilter()
Gets the event filter instance or null if none is defined.
|
static String |
getIDString(long id)
Converts an ID into a string.
|
Hashtable<String,Object> |
getLocalStorage()
Gets the client local hashtable for object storage.
|
ServerThreadGroup |
getServerThreadGroup()
Gets the ThreadGroup for this client connection.
|
static String |
getTabDelimitedConnectionIDString(ClientConnectionData clientConnectionData,
String threadName,
String threadID)
Gets the connection ID as a string.
|
boolean |
isEventLogged(int eventID)
Checks if an event is logged.
|
boolean |
logEvent(int eventID)
Log the event.
|
boolean |
logEvent(int eventID,
String appendedText)
Log the event.
|
String |
toString()
Gets the string representation of the client connection data.
|
public static final int TELNET_TRACE_INDEX
public static final int HOST_TRACE_INDEX
public static final int CLIENT_TRACE_INDEX
public static final int API_TRACE_INDEX
public static final int TRACE_BIT_BINARY
public static final int TRACE_BIT_VERBOSE
public transient InetAddress clientAddress
public transient String language
public transient String userID
public transient String[] applicationNames
public transient String luName
public transient InetAddress hostAddress
public transient Date connectionTime
public final transient byte[] traceLevels
The values are:
-1 = default trace,
0 = no trace,
1 = binary trace,
2 = verbose trace,
3 = binary and verbose trace.
The indexes are:
0 = Telnet,
1 = Host,
2 = Client,
3 = API.
public ClientConnectionData(long connectionID, byte[] defaultTrace, InetAddress clientAddress, String userID)
public ClientConnectionData(InetAddress clientAddress, String userID)
public ClientConnectionData(InetAddress clientAddress)
public ClientConnectionData createClone()
public ServerThreadGroup getServerThreadGroup()
public EventFilter getEventFilter()
public long getConnectionID()
public static String getConnectionIDString(ClientConnectionData clientConnectionData)
public static String getConnectionIDString(ClientConnectionData clientConnectionData, String threadName, String threadID)
public static String getTabDelimitedConnectionIDString(ClientConnectionData clientConnectionData, String threadName, String threadID)
public String getConnectionIDString()
public static String getIDString(long id)
public int getConnectionTimeInSeconds()
public boolean doTelnetBinaryTrace()
public boolean doTelnetVerboseTrace()
public boolean doHostBinaryTrace()
public boolean doHostVerboseTrace()
public boolean doClientBinaryTrace()
public boolean doClientVerboseTrace()
public boolean doAPIBinaryTrace()
public boolean doAPIVerboseTrace()
public boolean isEventLogged(int eventID)
logEvent
method if the event requires many object instances
of e.g. String
in order to relieve the garbage collector.
The logEvent
method always calls the isEventLogged
method first in order to verify if the event is filtered or not.
All events are numbered and stored in the EventID
class as
static member variables.
EventID
public boolean logEvent(int eventID, String appendedText)
isEventLogged
may be used to check if the event is logged
or not.
The logEvent
method always calls the isEventLogged
method first in order to verify if the event is filtered or not.
All events are numbered and stored in the EventID
class as
static member variables.
The appendedText
variable may be set to null, in which case
no text will be appended to the event text.
EventID
public boolean logEvent(int eventID)
isEventLogged
may be used to check if the event is logged
or not.
The logEvent
method always calls the isEventLogged
method first in order to verify if the event is filtered or not.
All events are numbered and stored in the EventID
class as
static member variables.
EventID
public String getApplicationNames()
public String toString()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.