final class AdminServicesImpl extends java.lang.Object implements AdminServicesDef
Constructor and Description |
---|
AdminServicesImpl(T3Client t3cl) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
cancelShut()
Cancels a pending shutdown of a WebLogic Server.
|
(package private) static java.lang.Object |
create(T3Client t3) |
void |
disableWatchDog()
Disables a T3Client as an administrative WatchDog.
|
void |
enableWatchDog(int intervalSecs)
Enables a T3Client as an administrative WatchDog.
|
java.lang.String |
lockServer(java.lang.String message)
Locks the WebLogic Server from logins.
|
java.lang.String |
ping()
Pings a WebLogic Server from the specified T3Client.
|
java.lang.String |
ping(byte[] echo)
Pings a WebLogic Server from the specified T3Client
with the specified array of bytes as a ping message.
|
java.lang.String |
shut()
Shuts down a WebLogic Server from a T3Client.
|
java.lang.String |
shut(int waitSecs)
Shuts down a WebLogic Server from a T3Client.
|
java.lang.String |
shut(java.lang.String message,
int waitSecs)
Shuts down a WebLogic Server from a T3Client.
|
void |
threadDump() |
java.lang.String |
unlockServer()
Unlocks the WebLogic Server from logins.
|
java.lang.String |
version()
Gets the version of a WebLogic Server from a T3Client.
|
T3Client t3
AdminServicesImpl(T3Client t3cl)
static java.lang.Object create(T3Client t3)
public java.lang.String ping(byte[] echo) throws java.lang.Exception
ping
in interface AdminServicesDef
echo
- Byte array to ping the server withjava.lang.Exception
- if there is an errorpublic java.lang.String ping() throws java.lang.Exception
java.lang.Exception
- if there is an errorpublic java.lang.String shut(int waitSecs) throws java.lang.Exception
This is a privileged method, and can only be invoked on a T3Client that has connected with a T3User "system" and the system password. Note that a fixed interval for shutdown of internal processes is built into WebLogic (about 20 seconds).
shut
in interface AdminServicesDef
waitSecs
- Delay interval before shutdownjava.lang.Exception
- if there is an errorpublic java.lang.String shut() throws java.lang.Exception
This is a privileged method, and can only be invoked on a T3Client that has connected with a T3User "system" and the system password.
shut
in interface AdminServicesDef
java.lang.Exception
- if there is an errorpublic java.lang.String shut(java.lang.String message, int waitSecs) throws java.lang.Exception
This is a privileged method, and can only be invoked on a T3Client that has connected with a T3User "system" and the system password. Note that a fixed interval for shutdown of internal processes is built into WebLogic (about 20 seconds).
shut
in interface AdminServicesDef
message
- Shutdown messagewaitSecs
- Delay interval before shutdownjava.lang.Exception
- if there is an errorpublic java.lang.String cancelShut() throws java.lang.Exception
This is a privileged method that can only be invoked on a T3Client that has connected with a T3User "system" and the system password.
cancelShut
in interface AdminServicesDef
java.lang.Exception
- if there is an errorpublic java.lang.String lockServer(java.lang.String message) throws java.lang.Exception
lockServer
in interface AdminServicesDef
message
- Message rejecting loginsjava.lang.Exception
- if there is an errorpublic java.lang.String unlockServer() throws java.lang.Exception
unlockServer
in interface AdminServicesDef
java.lang.Exception
- if there is an errorpublic java.lang.String version() throws java.lang.Exception
version
in interface AdminServicesDef
java.lang.Exception
- if there is an errorpublic void enableWatchDog(int intervalSecs) throws java.lang.Exception
When a client is an WatchDog, the client is then responsible for invoking the ping() method every intervalSecs seconds. The ping() will check that the WebLogic Server is still alive and reset the WebLogic Server's internal WatchDog timer. If the WebLogic Server fails to receive a ping within this interval, it will restart itself.
It is bad form to only call ping() every intervalSecs because if there is a transient network problem, then you will have squandered your only chance to restart the server. In practice, send a ping three or four times per intervalSecs. So, if intervalSecs is 60, you probably want to invoke ping() every 15-20 seconds.
Note that the T3Administrator can (and probably should) invoke T3Client.setSoftDisconnectTimeoutMins(int minutes) to some number greater than intervalSecs*60, and then periodically T3Client.disconnect(), and then instantiate a new T3Client with the same workspaceID. This will permit the WatchDog to not only test the existing socket to the WebLogic Server, but also the ability of T3Clients to connect to the WebLogic Server.
This is a privileged method, and can only be invoked on a T3Client that has specified a T3User of "system" and supplies the system password.
enableWatchDog
in interface AdminServicesDef
intervalSecs
- Interval for pingsjava.lang.Exception
- if there is an errorpublic void disableWatchDog() throws java.lang.Exception
This is a privileged method, and can only be invoked on a T3Client that has specified a T3User of "system".
disableWatchDog
in interface AdminServicesDef
java.lang.Exception
- if there is an errorpublic void threadDump() throws java.lang.Exception
threadDump
in interface AdminServicesDef
java.lang.Exception