public final class T3Client extends java.lang.Object implements weblogic.rjvm.PeerGoneListener, ClientCallback
Modifier and Type | Field and Description |
---|---|
private weblogic.common.internal.T3ClientParams |
cm |
private T3Connection |
connection |
static int |
DISCONNECT_TIMEOUT_DEFAULT
The default DISCONNECT_TIMEOUT value set in the server configuration.
|
static int |
DISCONNECT_TIMEOUT_NEVER
Disables disconnect altogether.
|
private boolean |
disconnectEventSent |
private java.util.Vector |
disconnectListeners
Disconnect event handling.
|
private int |
idleCallbackID |
static int |
INVALID_CALLBACK_ID |
private static weblogic.security.acl.internal.AuthenticatedSubject |
kernelId |
private java.lang.ClassLoader |
loader |
private java.lang.Thread |
loginThread |
private weblogic.rjvm.RJVM |
rjvm |
T3ServicesDef |
services
Defines the WebLogic services that a T3Client can access.
|
private java.lang.String |
workspace |
Constructor and Description |
---|
T3Client(java.lang.String url)
Constructs a T3Client.
|
T3Client(java.lang.String url,
java.lang.String workspace)
Constructs a T3Client.
|
T3Client(java.lang.String url,
java.lang.String workspace,
weblogic.security.acl.UserInfo t3u)
Constructs a T3Client.
|
T3Client(java.lang.String url,
weblogic.security.acl.UserInfo t3u)
Constructs a T3Client.
|
T3Client(T3Connection conn)
Constructs a T3Client over the specified T3Connection.
|
T3Client(T3Connection conn,
java.lang.String workspace)
Creates a T3Client object, given an existing T3Connection
and Workspace name.
|
Modifier and Type | Method and Description |
---|---|
void |
addDisconnectListener(DisconnectListener dl)
Adds a T3Client to the list of those clients listening
for a DisconnectEvent.
|
T3Client |
connect()
Connects the T3Client to a WebLogic Server.
|
T3Client |
disconnect()
Disconnects a T3Client from the WebLogic Server.
|
private void |
disconnectOccurred(DisconnectEvent de)
Sends an event that the disconnect has occurred.
|
void |
dispatch(java.lang.Throwable problem,
java.lang.Object msg) |
private static weblogic.protocol.configuration.ChannelHelperService |
getChannelHelperService() |
int |
getHardDisconnectTimeoutMins()
Gets the value for a T3Client's hard disconnect
timeout in minutes.
|
int |
getIdleDisconnectTimeoutMins()
Gets the value for a T3Client's idle disconnect timeout
in minutes.
|
java.lang.String |
getServerName()
Gets the name of the WebLogic Server to which the T3Client
is currently connected.
|
int |
getSoftDisconnectTimeoutMins()
Gets the value for a T3Client's soft disconnect
timeout in minutes.
|
T3Connection |
getT3Connection()
Returns the T3Connection object by which a T3Client is connected
to a WebLogic Server.
|
T3ServicesDef |
getT3Services()
Returns the WebLogic services that a T3Client can access.
|
boolean |
getVerbose()
Gets the verbose setting for a T3Client.
|
boolean |
isConnected()
Determines whether the T3Client is connected to a WebLogic
Server, that is, whether the connect() method has been
called for this T3Client and the T3Client is currently connected.
|
java.lang.Class |
loadClass(java.lang.String className) |
void |
peerGone(weblogic.rjvm.PeerGoneEvent pge) |
weblogic.rjvm.RJVM |
private_getRJVM() |
private int |
registerCallback(ClientCallback c)
Registers a callback.
|
void |
removeDisconnectListener(DisconnectListener dl)
Removes a T3Client from the list of those clients
listening for a DisconnectEvent.
|
void |
sendOneWay(java.lang.String clss,
java.lang.Object o) |
java.lang.Object |
sendRecv(java.lang.String clss,
java.lang.Object o) |
weblogic.rjvm.Response |
sendRecvAsync(java.lang.String clss,
java.lang.Object o)
Replaces sendRecv and sendLazy/recv, because it is
non-blocking.
|
T3Client |
setHardDisconnectTimeoutMins(int minutes)
Sets the value for a T3Client's hard disconnect
timeout in minutes.
|
T3Client |
setIdleDisconnectTimeoutMins(int minutes)
Sets the value for a T3Client's idle disconnect timeout
in minutes.
|
T3Client |
setSoftDisconnectTimeoutMins(int minutes)
Sets the value for a T3Client's soft disconnect timeout in
minutes.
|
T3Client |
setVerbose(boolean verbose)
Sets the verbose setting for a T3Client.
|
private void |
shutdown(boolean rjvmExists) |
boolean |
timeTraceEnable(java.io.PrintStream ps) |
boolean |
timeTraceEnabled() |
java.lang.String |
toString()
Returns a string representation of the T3Client, including the
name of the host, the port to which it is connected, and its
Workspace ID.
|
private void |
unregisterCallback(int callbackID) |
public static final int DISCONNECT_TIMEOUT_DEFAULT
public static final int DISCONNECT_TIMEOUT_NEVER
private T3Connection connection
private weblogic.rjvm.RJVM rjvm
private weblogic.common.internal.T3ClientParams cm
private int idleCallbackID
private java.lang.Thread loginThread
private static final weblogic.security.acl.internal.AuthenticatedSubject kernelId
public T3ServicesDef services
T3ServletDef t3s = t3.services.remote().getT3Servlet("tutorial.t3client.StartupQuery"); t3s.execute(ps);
private java.lang.String workspace
private java.util.Vector disconnectListeners
private boolean disconnectEventSent
public static final int INVALID_CALLBACK_ID
private java.lang.ClassLoader loader
public T3Client(T3Connection conn, java.lang.String workspace)
The Workspace is the name or ID of an existing Workspace; if there is no Workspace on the WebLogic Server with that name or ID, the argument is assumed to be the name of a new T3Client Workspace that is to be created. When you specify the name of a Workspace on the WebLogic Server, that name is implicitly qualified on the left by the UserInfo's username, after the pattern "username:workspaceName".
conn
- T3Connectionworkspace
- Name or ID of a client workspacepublic T3Client(T3Connection conn)
conn
- T3Connection to a WebLogic Serverpublic T3Client(java.lang.String url, java.lang.String workspace, weblogic.security.acl.UserInfo t3u) throws java.io.IOException
The Workspace is the name or ID of an existing Workspace; if there is no Workspace on the WebLogic Server with that name or ID, the argument is assumed to be the name of a new T3Client Workspace that is to be created. When you specify the name of a Workspace on WebLogic, that name is implicitly qualified on the left by the UserInfo's username, after the pattern "username:workspaceName".
url
- URL for the WebLogic Serverworkspace
- Name or ID of a client Workspacet3u
- A UserInfo that has access to the
WebLogic Serverjava.net.UnknownHostException
- if the
URL for the WebLogic Server is invalidT3Exception
- if there is an error
creating the T3Clientjava.io.IOException
- if there is
an IO error with the connectionpublic T3Client(java.lang.String url, java.lang.String workspace) throws java.io.IOException
The Workspace is the name or ID of an existing Workspace; if there is no Workspace on the WebLogic Server with that name or ID, the argument is assumed to be the name of a new T3Client Workspace that is to be created. When you specify the name of a Workspace on WebLogic, that name is implicitly qualified on the left by the UserInfo's username, after the pattern "username:workspaceName". The default UserInfo is "T3User.GUEST".
url
- URL for the WebLogic Serverworkspace
- Name or ID of a client workspacejava.net.UnknownHostException
- if the
URL for the WebLogic Server is invalidT3Exception
- if there is an error
creating the T3Clientjava.io.IOException
- if there is
an IO error with the connectionpublic T3Client(java.lang.String url) throws java.io.IOException
url
- URL for the WebLogic Serverjava.net.UnknownHostException
- if the
URL for the WebLogic Server is invalidT3Exception
- if there is an error
creating the T3Clientjava.io.IOException
- if there is
an IO error with the connectionpublic T3Client(java.lang.String url, weblogic.security.acl.UserInfo t3u) throws java.io.IOException
url
- URL for the WebLogic Servert3u
- A UserInfo that has access to the
WebLogic Serverjava.net.UnknownHostException
- if the
URL for the WebLogic Server is invalidT3Exception
- if there is an error
creating the T3Clientjava.io.IOException
- if there is
an IO error with the connectionpublic T3ServicesDef getT3Services()
public weblogic.rjvm.RJVM private_getRJVM()
public boolean isConnected()
Also see Writing a T3Client application, in the WebLogic Server documentation, on how to set up a T3Client to listen for its own disconnect event.
T3Client.connect()
public T3Connection getT3Connection()
public boolean timeTraceEnabled()
public boolean timeTraceEnable(java.io.PrintStream ps)
public T3Client connect() throws java.io.IOException, T3ExecuteException, java.lang.SecurityException
java.io.IOException
- if an IO error occursT3Exception
- if there is an error with the connect requestT3ExecuteException
- if there is an error with the connect requestjava.lang.SecurityException
- if there is an error with the connect requestpublic void addDisconnectListener(DisconnectListener dl)
dl
- DisconnectListenerpublic void removeDisconnectListener(DisconnectListener dl)
dl
- DisconnectListenerprivate void disconnectOccurred(DisconnectEvent de)
de
- DisconnectEventprivate void shutdown(boolean rjvmExists)
public T3Client disconnect() throws java.io.IOException, T3Exception
Check the Developers Guide, Writing a T3Client application, in the WebLogic Server documentation, for info on how to set up a T3Client to listen for its own disconnect event. A T3Client can listen for a disconnect event that is the result of a soft or idle disconnect timeout.
java.io.IOException
- if an IO error occursT3Exception
- if there is an error with the disconnect requestpublic void peerGone(weblogic.rjvm.PeerGoneEvent pge)
peerGone
in interface weblogic.rjvm.PeerGoneListener
public void dispatch(java.lang.Throwable problem, java.lang.Object msg)
dispatch
in interface ClientCallback
public int getHardDisconnectTimeoutMins()
public T3Client setHardDisconnectTimeoutMins(int minutes) throws RemoteException, T3Exception
minutes
- Delay before cleanup after a
hard disconnect occursRemoteException
- if there is an errorT3Exception
public int getSoftDisconnectTimeoutMins()
T3Client.disconnect()
public T3Client setSoftDisconnectTimeoutMins(int minutes) throws RemoteException, T3Exception
Check the Developers Guide, Writing a T3Client application, in the WebLogic Server documentation for more info on how to set up a T3Client to listen for its own disconnect event.
minutes
- Delay after T3Client requests disconnectRemoteException
- if there is an errorT3Exception
T3Client.disconnect()
public int getIdleDisconnectTimeoutMins()
Check the Developers Guide, Writing a T3Client application, in the WebLogic Server documentation, for more info on how to set up a T3Client to listen for its own disconnect event.
public T3Client setIdleDisconnectTimeoutMins(int minutes) throws T3Exception
minutes
- MinutesRemoteException
- if there is an errorT3Exception
- if the timeout value
is invalid or if it cannot be setpublic java.lang.String getServerName()
public boolean getVerbose()
public T3Client setVerbose(boolean verbose) throws RemoteException
verbose
- True if verbose should be setRemoteException
- if there is an errorpublic java.lang.String toString()
toString
in class java.lang.Object
public void sendOneWay(java.lang.String clss, java.lang.Object o) throws RemoteException
RemoteException
public weblogic.rjvm.Response sendRecvAsync(java.lang.String clss, java.lang.Object o) throws RemoteException
RemoteException
- if there is an errorpublic java.lang.Object sendRecv(java.lang.String clss, java.lang.Object o) throws T3Exception
T3Exception
private int registerCallback(ClientCallback c)
private void unregisterCallback(int callbackID)
public java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
private static weblogic.protocol.configuration.ChannelHelperService getChannelHelperService()