Interface GatewayConnection
-
- All Known Implementing Classes:
AbstractGatewayConnection
,ClientGatewayConnection
,DesignerGatewayConnection
public interface GatewayConnection
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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) specifiedvoid
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 inint
getConnectionMode()
Returns the current connection mode: MODE_FULL MODE_READ_ONLY MODE_DISCONNECTEDint
getConnectTimeout()
java.lang.String
getEdgeProjectName()
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 Backupjava.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 schemejava.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.
-
-
-
Method Detail
-
connect
void connect(java.util.List<HttpURL> gatewayURLs)
Connect to the gateway(s) specified
-
disconnect
void disconnect()
-
getGatewayAddress
HttpURL getGatewayAddress()
Returns the address of the gateway that is currently being communicated with.
-
getAllAddresses
java.util.List<HttpURL> getAllAddresses()
Returns a list of all possible Gateway addresses that are known to the client. This list includes redundant master and backup addresses. The list is used for client restarts.
-
getGatewayInterface
GatewayInterface getGatewayInterface()
-
getGatewayWebURL
java.lang.String getGatewayWebURL()
Returns the url to the web portion of the gateway, like "http[s]://<address>:<port>[/context]"
-
getScheme
java.lang.String getScheme()
Returns "http" or "https" depending on our transport scheme
-
getGatewayNodeRole
java.lang.String getGatewayNodeRole()
Returns the string version of the currently connected gateway's "Node Role", which will be one of:- Independent
- Master
- Backup
-
getGatewayTimeZone
java.util.TimeZone getGatewayTimeZone()
-
login
AuthenticatedUser login(java.lang.String projectName, AuthChallenge challenge) throws GatewayException
- Throws:
GatewayException
-
logout
void logout()
-
getConnectionMode
int getConnectionMode()
Returns the current connection mode:- MODE_FULL
- MODE_READ_ONLY
- MODE_DISCONNECTED
-
setConnectionMode
void setConnectionMode(int connectionMode)
-
isConnected
boolean isConnected()
-
isConnectionUp
boolean isConnectionUp()
-
isSessionValid
boolean isSessionValid()
-
addPushNotificationListener
void addPushNotificationListener(PushNotificationListener listener)
-
removePushNotificationListener
void removePushNotificationListener(PushNotificationListener listener)
-
removePushNotificationListeners
void removePushNotificationListeners(java.lang.Class<?> c)
-
addPropertyChangeListener
void addPropertyChangeListener(java.beans.PropertyChangeListener l)
-
removePropertyChangeListener
void removePropertyChangeListener(java.beans.PropertyChangeListener l)
-
addPropertyChangeListener
void addPropertyChangeListener(java.lang.String propName, java.beans.PropertyChangeListener l)
-
removePropertyChangeListener
void removePropertyChangeListener(java.lang.String propName, java.beans.PropertyChangeListener l)
-
addConnectionListener
void addConnectionListener(ConnectionListener listener)
-
removeConnectionListener
void removeConnectionListener(ConnectionListener listener)
-
getProjectName
java.lang.String getProjectName()
The name of the project that we are currently logged into, if any.
-
getUsername
java.lang.String getUsername()
The username of the actively logged in user, if any.
-
getAuthChallenge
AuthChallenge getAuthChallenge()
The encrypted auth challenge that was used to log in
-
getRoles
java.util.List<java.lang.String> getRoles()
The set of roles that the actively logged in user has, if any.
-
getSecurityZones
java.util.List<java.lang.String> getSecurityZones()
The set of security zones that the actively logged in user has, if any.
-
getConnectTimeout
int getConnectTimeout()
-
setConnectTimeout
void setConnectTimeout(int connectTimeout)
-
getSocketTimeout
int getSocketTimeout()
-
setSocketTimeout
void setSocketTimeout(int socketTimeout)
-
getOpcBrowseTimeout
int getOpcBrowseTimeout()
-
setOpcBrowseTimeout
void setOpcBrowseTimeout(int opcBrowseTimeout)
-
getHttpConcurrency
int getHttpConcurrency()
The number of concurrent HTTP connections allowed. 0 or less means unlimited.
-
setHttpConcurrency
void setHttpConcurrency(int concurrency)
-
addConnectionStatusListener
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. The passed ConnectionStatusListener will be continually updated with master/independent and backup connection status every few seconds.
-
removeConnectionStatusListener
void removeConnectionStatusListener(ConnectionStatusListener listener)
-
triggerConnectionStatusListeners
void triggerConnectionStatusListeners()
Manually update the status of all connection listeners. Use this in situations where listeners need an immediate update without waiting for the normal thread task to fire (such as when first displaying a status panel).
-
getPlatformEdition
java.lang.String getPlatformEdition()
Platform edition. Standard edition = "", Edge edition = "edge"
-
getEdgeProjectName
java.lang.String getEdgeProjectName() throws GatewayException
- Returns:
- the name of the Edge project as defined by the user on the edge gateway settings
- Throws:
GatewayException
-
-