|
||||||||||
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
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.rad.remote.AbstractConnection |
---|
AbstractConnection.CallBackResultDelegate, AbstractConnection.ListenerDelegate<K>, AbstractConnection.PropertyChangedDelegate |
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<java.lang.String,java.lang.Object> |
createConnectionProperties()
Gets the properties which will be sent to the server when opening a new connection. |
SubConnection |
createSubConnection(java.lang.String pLifeCycleName)
Returns a new sub connection. |
long |
getAliveInterval()
Gets the current alive interval. |
java.util.List<SubConnection> |
getSubConnections()
Returns a cloned list of sub connections. |
protected UIInvoker |
getUIInvoker()
Gets the UI invoker. |
void |
openConnection()
Opens the connection without event handling. |
protected void |
removeSubConnection(SubConnection pSubConnection)
Removes a sub connection from the internal list of sub connections. |
void |
reopen()
Reopens this and all sub connections. |
void |
reopen(boolean pCloseSubConnections)
Reopens this connection. |
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(java.lang.String pOldPassword,
java.lang.String pNewPassword)
Sets the new password for the current connection. |
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 openConnection() throws java.lang.Throwable
openConnection
in class AbstractConnection
java.lang.Throwable
- if the connection can not be or is already openedprotected UIInvoker getUIInvoker()
getUIInvoker
in class AbstractConnection
UIInvoker
public void close() throws java.lang.Throwable
close
in interface ICloseable
close
in class AbstractConnection
java.lang.Throwable
- if it is not possible to close the connectionpublic void reopen() throws java.lang.Throwable
reopen
in class AbstractConnection
java.lang.Throwable
- if an error occurs while opening this or any sub connectionprotected ChangedHashtable<java.lang.String,java.lang.Object> createConnectionProperties()
createConnectionProperties
in class AbstractConnection
public void reopen(boolean pCloseSubConnections) throws java.lang.Throwable
pCloseSubConnections
- true
to close sub connections and don't reopen them,
false
if sub connections should be reopened
java.lang.Throwable
- if an error occurs while reopening this or any sub connectionpublic SubConnection createSubConnection(java.lang.String pLifeCycleName) throws java.lang.Throwable
pLifeCycleName
- the name of the life-cycle object for the sub connection
SubConnection
for the sub connection
java.lang.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 java.util.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 void setNewPassword(java.lang.String pOldPassword, java.lang.String pNewPassword) throws java.lang.Throwable
pOldPassword
- the old passwordpNewPassword
- the new password
java.lang.Throwable
- if the password can not be changedpublic void setAndCheckAlive() throws java.lang.Throwable
java.lang.Throwable
- if the alive check fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |