- com
- pcbsys
- nirvana
- base
- clientimpl
- singleconnection
- ClientConnectionManagerImpl
This class represents the logical connection between a com.pcbsys.nirvana.client.nSession and a realm server. More...
Inherits com.pcbsys.nirvana.base.clientimpl.ClientConnectionManager.
Public Member Functions | |
void | addReconnectHandler (nReconnectHandler handler) |
Registers a handler to monitor the state of this connection. More... | |
ClientConnectionManagerImpl (String myUniqueClientAllocatedID, nSession session, SessionAttributes sessionAttributes, nThreadManager threadManager, nQueueReaderManagerHelper queueReaderManagerHelper, nDataGroupManagerHelper dataGroupManagerHelper, nChannelIteratorHelper channelIteratorManagerHelper, nRedirectManagerHelper redirectManagerHelper, nStoreManagerHelper storeManagerHelper, nDurableHelper durableManagerHelper, String username, String password, boolean isAdminApi) | |
The constructor of connection manager. More... | |
void | close () |
Closes all state related to this connection. | |
void | configureMultiplexManager (ClientConnectionManager myConnectionManager) |
This method will add a multiplex manager. More... | |
String | getLocalHostAndPort () throws nSessionNotConnectedException |
Creates a string of the current host and port we are bound to locally. More... | |
String | getServerProvidedRealmName () throws nSessionNotConnectedException |
Returns the currently connected to realms' name. More... | |
List< fConnectionDetails > | getSessionAttributesList () |
Flattens the list of lists into a single connection details list. More... | |
String | getThirdPartyCookies () throws nSessionNotConnectedException |
When using URL drivers there was desire to be able to access the cookie being provided, very limited use cases. More... | |
nDataStream | initialise (nDataStreamListener streamListener, EventHandlerInitialiser eventHandlerInitialiser, boolean disconnectOnClusterFailure, boolean sessionThreadsDaemon) throws nRealmUnreachableException, nSessionNotConnectedException, nSecurityException |
This will start fDriver connections thus begining this connections life. More... | |
void | registerExtensionCallback (nServerExtensionCallback callback) |
A API used only by terracotta CLC, once we confirm its dead we can remove this. More... | |
void | releaseRequests () |
This method will release all outstanding events waiting for response from the server, it is detramental to those outstanding events state so use carefully. | |
void | removeReconnectHandler (nReconnectHandler handler) |
Removes the handler if registered to monitor the state of this connection. More... | |
void | setHTTPURLParameters (String parameter) |
This is a very bad hack to set headers, we really need to remove the static nature of this and set it on a individual session basis. More... | |
void | setKeepAliveTimeOnCurrentConnection (long time) |
Used to update the keep alive interval. More... | |
void | unblockThread (String name) |
Used when a thread is being asked to stop and has an outstanding request from the server, it is detrimental to that event instance state however we are usually closing. More... | |
Public Member Functions inherited from com.pcbsys.nirvana.base.clientimpl.ClientConnectionManager | |
nDataStream | initialise (nDataStreamListener streamListener, EventHandlerInitialiser eventHandlerInitialser, boolean disconnectOnClusterFailure, boolean sessionThreadsDaemon) throws nRealmUnreachableException, nSessionNotConnectedException, nSecurityException |
This will start fDriver connections thus begining this connections life. More... | |
This class represents the logical connection between a com.pcbsys.nirvana.client.nSession and a realm server.
It encompasses all stores, handlers and state that has context between a fConnection and a server as opposed to a nSession.
com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.ClientConnectionManagerImpl | ( | String | myUniqueClientAllocatedID, |
nSession | session, | ||
SessionAttributes | sessionAttributes, | ||
nThreadManager | threadManager, | ||
nQueueReaderManagerHelper | queueReaderManagerHelper, | ||
nDataGroupManagerHelper | dataGroupManagerHelper, | ||
nChannelIteratorHelper | channelIteratorManagerHelper, | ||
nRedirectManagerHelper | redirectManagerHelper, | ||
nStoreManagerHelper | storeManagerHelper, | ||
nDurableHelper | durableManagerHelper, | ||
String | username, | ||
String | password, | ||
boolean | isAdminApi | ||
) |
The constructor of connection manager.
myUniqueClientAllocatedID | This is the unique session ID allocated to this complete nSessions life time |
session | the nSession this manager belongs too. |
sessionAttributes | the attributes this connection manager will use to to configure the connection |
threadManager | the thread pool allocated for use by this connection manager it is used for stores, callbacks etc |
queueReaderManagerHelper | Used to bypass package restrictions without exposing API |
dataGroupManagerHelper | Used to bypass package restrictions without exposing API |
channelIteratorManagerHelper | Used to bypass package restrictions without exposing API |
redirectManagerHelper | Used to bypass package restrictions without exposing API |
storeManagerHelper | Used to bypass package restrictions without exposing API |
durableManagerHelper | Used to bypass package restrictions without exposing API |
username | The username to use for logging to the realm |
password | The password to use for logging to the realm |
void com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.addReconnectHandler | ( | nReconnectHandler | handler | ) |
Registers a handler to monitor the state of this connection.
handler | the object used when callbacks happen |
void com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.configureMultiplexManager | ( | ClientConnectionManager | myConnectionManager | ) |
This method will add a multiplex manager.
myConnectionManager | the connection manager to add the fConnections |
String com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.getLocalHostAndPort | ( | ) | throws nSessionNotConnectedException |
Creates a string of the current host and port we are bound to locally.
nSessionNotConnectedException | if we are currently not connected |
String com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.getServerProvidedRealmName | ( | ) | throws nSessionNotConnectedException |
Returns the currently connected to realms' name.
nSessionNotConnectedException | if the session is not currently connected |
List<fConnectionDetails> com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.getSessionAttributesList | ( | ) |
Flattens the list of lists into a single connection details list.
String com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.getThirdPartyCookies | ( | ) | throws nSessionNotConnectedException |
When using URL drivers there was desire to be able to access the cookie being provided, very limited use cases.
Think JPMM
nSessionNotConnectedException | if we are currently not connected |
nDataStream com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.initialise | ( | nDataStreamListener | streamListener, |
EventHandlerInitialiser | eventHandlerInitialiser, | ||
boolean | disconnectOnClusterFailure, | ||
boolean | sessionThreadsDaemon | ||
) | throws nRealmUnreachableException, nSessionNotConnectedException, nSecurityException |
This will start fDriver connections thus begining this connections life.
streamListener | will allo data stream events into this session if set otherwise they are not enabled for DG |
eventHandlerInitialiser | This method will configure event handlers for events we receive from the server |
disconnectOnClusterFailure | This is a temporary hack as the two methods in nSession setting these must go |
sessionThreadsDaemon | This is a temporary hack as the two methods in nSession setting these must go |
nRealmUnreachableException | If we cannot connect to any realm in the provided list |
nSessionNotConnectedException | If after creating the fConnection but before finishing the handshake we are disconnected, this could be for many reasons like ACL's networks etc |
nSecurityException | If we do not have permission to connect to this realm, its considered a permanent failure |
void com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.registerExtensionCallback | ( | nServerExtensionCallback | callback | ) |
A API used only by terracotta CLC, once we confirm its dead we can remove this.
callback | the callback to use for this api |
void com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.removeReconnectHandler | ( | nReconnectHandler | handler | ) |
Removes the handler if registered to monitor the state of this connection.
handler | the object to remove |
void com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.setHTTPURLParameters | ( | String | parameter | ) |
This is a very bad hack to set headers, we really need to remove the static nature of this and set it on a individual session basis.
parameter | the new HTTPURLParameter to set |
void com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.setKeepAliveTimeOnCurrentConnection | ( | long | time | ) |
Used to update the keep alive interval.
time | the interval to set if possible |
void com.pcbsys.nirvana.base.clientimpl.singleconnection.ClientConnectionManagerImpl.unblockThread | ( | String | name | ) |
Used when a thread is being asked to stop and has an outstanding request from the server, it is detrimental to that event instance state however we are usually closing.
name | the name of the thread we want to interrupt |