|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.remote.AbstractConnection
javax.rad.remote.MasterConnection
public class MasterConnection
The MasterConnection
provides sub connections and
an alive check for all known connections.
IConnection
Field Summary |
---|
Fields inherited from class javax.rad.remote.AbstractConnection |
---|
coninf, connection |
Constructor Summary | |
---|---|
MasterConnection(IConnection pConnection)
Creates a new instance of AppliationConnection with an
IConnection implementation. |
Method Summary | |
---|---|
protected void |
addSubConnection(SubConnection pSubConnection)
Adds a sub connection to the internal list of sub connections. |
void |
close()
Close the connection. |
protected ChangedHashtable<String,Object> |
createConnectionProperties()
Gets the properties which will be sent to the server when opening a new connection. |
SubConnection |
createSubConnection(String pLifeCycleName)
Returns a new sub connection. |
long |
getAliveInterval()
Gets the current alive interval. |
List<SubConnection> |
getSubConnections()
Returns a cloned list of sub connections. |
static boolean |
isAliveCheckEnabled()
Gets whether the alive check should be used. |
void |
open()
Opens the connection. |
protected void |
removeSubConnection(SubConnection pSubConnection)
Removes a sub connection from the internal list of sub connections. |
void |
reopen()
Reopens this and all sub connections. |
static void |
setAliveCheckEnabled(boolean pEnabled)
Sets whether alive check should be used. |
void |
setAliveInterval(long pInterval)
Sets the interval of the alive thread. |
void |
setAndCheckAlive()
Sends the alive information to the server and checks all sub connections if they are still valid. |
void |
setNewPassword(String pOldPassword,
String pNewPassword)
Sets the new password for the current connection. |
Methods inherited from class javax.rad.remote.AbstractConnection |
---|
addConnectionListener, call, call, call, call, call, call, call, callAction, callAction, callAction, callAction, callAction, callAction, callAction, finalize, fireCall, fireCallAction, fireCallError, fireClose, fireOpen, firePropertyChanged, fireReOpen, getApplicationName, getConnection, getConnectionId, getConnectionListener, getLifeCycleName, getPassword, getProperties, getProperty, getTimeout, getUserName, isOpen, removeConnectionListener, setApplicationName, setLifeCycleName, setPassword, setProperty, setTimeout, setUserName |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MasterConnection(IConnection pConnection)
AppliationConnection
with an
IConnection
implementation.
pConnection
- the IConnection
implementationMethod Detail |
---|
public void open() throws Throwable
open
in class AbstractConnection
Throwable
- if the connection can not be or is already openedpublic void close() throws Throwable
close
in class AbstractConnection
Throwable
- if it is not possible to close the connectionpublic void reopen() throws Throwable
reopen
in class AbstractConnection
Throwable
- if an error occurs while opening this or any sub connectionprotected ChangedHashtable<String,Object> createConnectionProperties()
createConnectionProperties
in class AbstractConnection
public SubConnection createSubConnection(String pLifeCycleName) throws Throwable
pLifeCycleName
- the name of the life-cycle object for the sub connection
SubConnection
for the sub connection
Throwable
- if it is not possible to create the new sub connectionprotected void addSubConnection(SubConnection pSubConnection)
pSubConnection
- the sub connectionprotected void removeSubConnection(SubConnection pSubConnection)
pSubConnection
- the sub connectionpublic List<SubConnection> getSubConnections()
public void setAliveInterval(long pInterval)
ALIVECHECK_DELAY
.
pInterval
- interval in millis. If the value is smaller
or equal than one second, the default value will be set.
An interval with a negative value will disable the alive checkpublic long getAliveInterval()
public static void setAliveCheckEnabled(boolean pEnabled)
SubConnection
creation
or this
connection will be opened.
pEnabled
- true
to enable the alive check, false
to disable the checkpublic static boolean isAliveCheckEnabled()
true
if the alive check is enabled, false
if it's disabledsetAliveCheckEnabled(boolean)
public void setNewPassword(String pOldPassword, String pNewPassword) throws Throwable
pOldPassword
- the old passwordpNewPassword
- the new password
Throwable
- if the password can not be changedpublic void setAndCheckAlive() throws Throwable
Throwable
- if the alive check fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |