public interface GatewayConnection
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(ConnectionListener listener) |
void |
addConnectionStatusListener(ConnectionStatusListener listener)
Different from the ConnectionListener in the sense that this listener is intended for use in redundant setups,
where the status of the inactive connection must be updated along with the status of the active connection.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l) |
void |
addPropertyChangeListener(java.lang.String propName,
java.beans.PropertyChangeListener l) |
void |
addPushNotificationListener(PushNotificationListener listener) |
void |
connect(java.util.List<HttpURL> gatewayURLs)
Connect to the gateway(s) specified
|
void |
disconnect() |
java.util.List<HttpURL> |
getAllAddresses()
Returns a list of all possible Gateway addresses that are known to the client.
|
AuthChallenge |
getAuthChallenge()
The encrypted auth challenge that was used to log in
|
int |
getConnectionMode()
Returns the current connection mode:
MODE_FULL
MODE_READ_ONLY
MODE_DISCONNECTED
|
int |
getConnectTimeout() |
HttpURL |
getGatewayAddress()
Returns the address of the gateway that is currently being communicated with.
|
GatewayInterface |
getGatewayInterface() |
java.lang.String |
getGatewayNodeRole()
Returns the string version of the currently connected gateway's "Node Role", which will be one of:
Independent
Master
Backup
|
java.util.TimeZone |
getGatewayTimeZone() |
java.lang.String |
getGatewayWebURL()
Returns the url to the web portion of the gateway, like "http[s]://<address>:<port>[/context]"
|
int |
getHttpConcurrency()
The number of concurrent HTTP connections allowed.
|
int |
getOpcBrowseTimeout() |
java.lang.String |
getPlatformEdition()
Platform edition.
|
java.lang.String |
getProjectName()
The name of the project that we are currently logged into, if any.
|
java.util.List<java.lang.String> |
getRoles()
The set of roles that the actively logged in user has, if any.
|
java.lang.String |
getScheme()
Returns "http" or "https" depending on our transport scheme
|
java.util.List<java.lang.String> |
getSecurityZones()
The set of security zones that the actively logged in user has, if any.
|
int |
getSocketTimeout() |
java.lang.String |
getUsername()
The username of the actively logged in user, if any.
|
boolean |
isConnected() |
boolean |
isConnectionUp() |
boolean |
isSessionValid() |
AuthenticatedUser |
login(java.lang.String projectName,
AuthChallenge challenge) |
void |
logout() |
void |
removeConnectionListener(ConnectionListener listener) |
void |
removeConnectionStatusListener(ConnectionStatusListener listener) |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l) |
void |
removePropertyChangeListener(java.lang.String propName,
java.beans.PropertyChangeListener l) |
void |
removePushNotificationListener(PushNotificationListener listener) |
void |
removePushNotificationListeners(java.lang.Class<?> c) |
void |
setConnectionMode(int connectionMode) |
void |
setConnectTimeout(int connectTimeout) |
void |
setHttpConcurrency(int concurrency) |
void |
setOpcBrowseTimeout(int opcBrowseTimeout) |
void |
setSocketTimeout(int socketTimeout) |
void |
triggerConnectionStatusListeners()
Manually update the status of all connection listeners.
|
void connect(java.util.List<HttpURL> gatewayURLs)
void disconnect()
HttpURL getGatewayAddress()
java.util.List<HttpURL> getAllAddresses()
GatewayInterface getGatewayInterface()
java.lang.String getGatewayWebURL()
java.lang.String getScheme()
java.lang.String getGatewayNodeRole()
java.util.TimeZone getGatewayTimeZone()
AuthenticatedUser login(java.lang.String projectName, AuthChallenge challenge) throws GatewayException
GatewayException
void logout()
int getConnectionMode()
void setConnectionMode(int connectionMode)
boolean isConnected()
boolean isConnectionUp()
boolean isSessionValid()
void addPushNotificationListener(PushNotificationListener listener)
void removePushNotificationListener(PushNotificationListener listener)
void removePushNotificationListeners(java.lang.Class<?> c)
void addPropertyChangeListener(java.beans.PropertyChangeListener l)
void removePropertyChangeListener(java.beans.PropertyChangeListener l)
void addPropertyChangeListener(java.lang.String propName, java.beans.PropertyChangeListener l)
void removePropertyChangeListener(java.lang.String propName, java.beans.PropertyChangeListener l)
void addConnectionListener(ConnectionListener listener)
void removeConnectionListener(ConnectionListener listener)
java.lang.String getProjectName()
java.lang.String getUsername()
AuthChallenge getAuthChallenge()
java.util.List<java.lang.String> getRoles()
java.util.List<java.lang.String> getSecurityZones()
int getConnectTimeout()
void setConnectTimeout(int connectTimeout)
int getSocketTimeout()
void setSocketTimeout(int socketTimeout)
int getOpcBrowseTimeout()
void setOpcBrowseTimeout(int opcBrowseTimeout)
int getHttpConcurrency()
void setHttpConcurrency(int concurrency)
void addConnectionStatusListener(ConnectionStatusListener listener)
void removeConnectionStatusListener(ConnectionStatusListener listener)
void triggerConnectionStatusListeners()
java.lang.String getPlatformEdition()