public class HTTPFabricConnection extends com.streamscape.sef.dispatcher.AbstractHTTPFabricConnection implements FabricConnection
Title: HTTP Fabric Client
Description: Main class which provides API for working with Fabric from an HTTP client.
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
Modifier and Type | Class and Description |
---|---|
static class |
HTTPFabricConnection.HTTPClientWrapper |
static interface |
HTTPFabricConnection.ReverseCallableExecutor |
static interface |
HTTPFabricConnection.RunnableException |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_FILE_TRANSFERS_DIRECT_CONSUMERS_TIMEOUT_IN_MS |
static int |
DEFAULT_HTTP_TIMEOUT_IN_MS |
static long |
DEFAULT_LEASE_TIMEOUT |
static int |
DEFAULT_REVERSE_HOLD_TIMEOUT_MS |
static int |
DEFAULT_REVERSE_REPLY_TIMEOUT_MS |
static java.lang.String |
FABRIC_REALM |
static java.lang.String |
FABRIC_SESSION |
static java.lang.String |
FABRIC_URL |
static java.lang.String |
MAGIC |
DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL, HTTP_TYPE, HTTPS_TYPE, LOCAL_URL, REST_TYPE, SSL_URL_PREFIX, TLP_TYPE, TLPS_TYPE, URL_PREFIX, XMPP_TYPE
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeEvent(EventDatagram event,
boolean withSourceData,
AcknowledgeAction action,
java.lang.String recipientId,
EventScope eventScope,
long timeToLive)
Raises an acknowledgement on the specified event.
|
void |
acknowledgeException(ExceptionEventDatagram ex,
AcknowledgeAction action,
java.lang.String recipientId,
EventScope eventScope,
long timeToLive)
Raises an acknowledgement on the specified exception event.
|
void |
addEventCache(java.lang.String eventFilter,
int maxSize,
CacheThresholdAction thresholdAction)
Adds a new event cache.
|
void |
addSemanticType(java.lang.Class typeClass) |
void |
addStateEventListener(HTTPFabricConnectionStateEventListener listener) |
void |
addURL(java.lang.String url)
Adds the specified URL to the list of URLs.
|
void |
bindProducerFor(java.lang.String eventId)
Binds the specified event identifier to the connection.
|
void |
close()
Closes the connection.
|
void |
close(long timeout)
Closes the connection.
|
void |
closeQuiet() |
DataspaceAccessor |
createDataspaceAccessor(DataspaceType dataspaceType,
java.lang.String dataspaceName)
Creates an accessor to the dataspace with the specified type and name.
|
DataspaceAccessor |
createDataspaceAccessor(java.lang.String nodeName,
DataspaceType dataspaceType,
java.lang.String dataspaceName)
Creates an accessor to the dataspace with the specified type and name.
|
DomainConstraint |
createDomainConstraint(java.lang.String domainName,
java.lang.String description,
java.util.Set values)
Creates a new Domain Constraint with the specified parameters.
|
HTTPEventAsyncConsumer |
createEventAsyncConsumer(java.lang.String consumerName,
FabricEventListener listener,
java.lang.String eventFilter,
java.lang.String eventSelector,
EventScope eventScope,
boolean noLocal)
Creates a new event asynchronous consumer and adds this consumer the dispatcher.
|
com.streamscape.cli.http.HTTPEventConsumer |
createEventConsumer(java.lang.String consumerName,
FabricEventListener listener,
java.lang.String eventFilter,
java.lang.String eventSelector,
EventScope eventScope,
boolean noLocal)
Creates a new event consumer and adds this consumer to the dispatcher.
|
EventReceiver |
createEventReceiver(java.lang.String receiverName,
java.lang.String eventFilter,
java.lang.String eventSelector,
EventScope eventScope,
boolean noLocal)
Creates a new event receiver and adds this receiver to the the dispatcher.
|
JSONSerializer |
createJSONSerializer(java.lang.String name) |
JSONSerializer.JsonSerializerBuilderImpl |
createJSONSerializerBuilder(java.lang.String name) |
RangeConstraint |
createRangeConstraint(java.lang.String rangeName,
java.lang.String description,
java.lang.Object minValue,
java.lang.Object maxValue)
Creates a new Range Constraint with the specified parameters.
|
EventRequestConsumer |
createRequestConsumer(java.lang.String consumerName,
FabricRequestListener listener,
EventScope eventScope)
Creates a new event request consumer and adds this consumer the dispatcher.
|
ServiceAccessor |
createServiceAccessor(java.lang.String serviceType,
java.lang.String serviceName)
Creates an accessor to a service with the specified type and name.
|
ServiceAccessor |
createServiceAccessor(java.lang.String nodeName,
java.lang.String serviceType,
java.lang.String serviceName)
Creates an accessor to a service with the specified type and name.
|
SLSession |
createSLSession()
Creates a
Semantic Language session to the current node. |
SLSession |
createSLSession(java.lang.String nodeName)
Creates a
Semantic Language session to the Fabric node with the specified name. |
void |
dropConsumer(java.lang.String consumerName)
Drops a consumer with the specified name.
|
void |
dropDomainConstraint(java.lang.String domainName)
Drops a Domain Constraint with the specified name.
|
void |
dropEventAsyncConsumer(java.lang.String consumerName)
Drops an event asynchronous with the specified name.
|
void |
dropEventConsumer(java.lang.String consumerName)
Drops an event consumer with the specified name from the dispatcher.
|
void |
dropEventReceiver(java.lang.String receiverName)
Drops a receiver with the specified name.
|
void |
dropRangeConstraint(java.lang.String rangeName)
Drops a Range Constraint with the specified name.
|
void |
dropRequestConsumer(java.lang.String consumerName)
Drops an event request with the specified name.
|
void |
enableReverseThreadMonitor(boolean enabled)
Enables disables reverse thread monitor.
|
void |
exportEventPrototype(java.lang.String eventId)
Exports an Event Prototype with the specified event id to the Fabric node with which the connection established.
|
void |
exportExtensionArchive(java.io.File jarFile)
Exports the specified JAR file to the Fabric node with which the connection established.
|
void |
exportSemanticType(java.lang.String typeName)
Exports the specified Semantic Type to the Fabric node with which the connection established.
|
void |
forceClose()
Forcibly closes the connection.
|
java.lang.String |
getAcceptorName()
Returns HTTP Acceptor name
|
ObjectMediationAliasManager |
getAliasManager() |
long |
getAsyncConsumerAndSLMessageTimeoutsForReverseMonitorMs()
Returns the timeout for async consumers and SLMessages used by reverse thread monitor to detect if reverse thread ie being hung or not.
|
AuthenticationType |
getAuthenticationType()
Returns an authentication type of the connection.
|
java.nio.charset.Charset |
getCCSID()
Returns a
CCSID configured in the current Fabric node. |
java.lang.ClassLoader |
getClassLoader()
Returns class loader where imported libraries are loaded.
|
ClientId |
getClientId()
Returns a Client ID of the connection.
|
ComponentReference |
getComponentReference()
Returns a
ComponentReference associated with the connection. |
long |
getConnectionReopenInterval()
Returns the time in seconds between unsuccessful reopen retries.
|
java.lang.String |
getDescription()
Returns a description of the connection.
|
DomainConstraint |
getDomainConstraint(java.lang.String domainName)
Finds and returns a copy of Domain Constraint with the specified name.
|
EventAsyncConsumer |
getEventAsyncConsumer(java.lang.String consumerName)
Finds and returns an event asynchronous consumer with the specified name.
|
EventCache |
getEventCache(java.lang.String eventFilter)
Returns an event cache associated with the specified simple event filter.
|
EventConsumer |
getEventConsumer(java.lang.String consumerName)
Finds and returns an event consumer with the specified name.
|
HTTPEventFactory |
getEventFactory() |
EventReceiver |
getEventReceiver(java.lang.String receiverName)
Finds and returns an event receiver with the specified name.
|
EventScope |
getEventScope()
Returns an event scope of the connection.
|
FabricEventListener |
getExceptionListener()
Returns the listener that processes all exception events raised in the node or sysplex.
|
ExceptionStrategy |
getExceptionStrategy()
Returns an exception strategy of the connection.
|
FabricAddress |
getFabricAddress()
Returns a Fabric address of the connection.
|
long |
getFileTransfersDirectConsumersTimeout()
Returns the timeout for file transfers from remote node and direct consumers in milliseconds.
|
FabricGroupLink |
getGroupLink(java.lang.String groupName)
Returns a link to the specified group if the connection is a member of this group.
|
FabricGroupManager |
getGroupManager()
Returns a Fabric Group Manager associated with the connection.
|
java.util.TimeZone |
getHostTimezone()
Returns a timezone of the host where the current Fabric node is running.
|
long |
getHttpTimeout()
Returns http timeout in milliseconds.
|
long |
getLeasePeriod()
Returns lease period value.
|
int |
getMaxRetriesCount()
Returns how much times we should retry http request if it was failed with IO exception.
|
Moderator |
getModerator()
Returns a moderator associated with the connection.
|
java.lang.String |
getName()
Returns a name of the connection.
|
java.util.TimeZone |
getNodeTimezone()
Returns a timezone configured in the current Fabric node.
|
RangeConstraint |
getRangeConstraint(java.lang.String rangeName)
Finds and returns a copy of Range Constraint with the specified name.
|
int |
getReconnectAttempts()
Returns a number of reconnect attempts that will be made by the connection in a case of the remote node disconnection.
|
long |
getReconnectInterval()
Returns a time (in seconds) between successive reconnect attempts that will be made by the connection
in a case of the remote node disconnection.
|
RepositoryAccessor |
getRepositoryAccessor()
Returns an accessor to the Repository located in the current node.
|
RepositoryAccessor |
getRepositoryAccessor(java.lang.String nodeName)
Returns an accessor to the Repository located in the node with the specified name.
|
EventRequestConsumer |
getRequestConsumer(java.lang.String consumerName)
Finds and returns an event request consumer with the specified name.
|
long |
getReverseConnectionHoldTimeout() |
long |
getReverseReplyTimeout()
Returns reverse reply timeout in milliseconds.
|
java.lang.String |
getRuntimeVersion()
Returns runtime version of target node.
|
SecurityManager |
getSecurityManager()
Returns a Security Manager associated with the connection.
|
java.lang.String |
getSessionId() |
HTTPStatistics |
getStatistics() |
java.lang.String |
getSysplexDomain()
Returns sysplex domain name of target node.
|
long |
getTimestamp()
Returns a timestamp indicating when the connection was opened.
|
java.lang.String |
getType()
Returns a type of the connection.
|
java.lang.String |
getURL()
Returns the actual URL of the connection.
|
java.util.List |
getURLs()
Returns a list of URLs.
|
java.lang.String |
getUserName()
Returns a user name of the connection.
|
boolean |
hasBoundEventIds()
Checks if the connection has bound event identifiers.
|
void |
importEventPrototype(java.lang.String eventId)
Imports an Event Prototype with the specified event id from the Fabric node with which the connection established.
|
void |
importExtensionArchive(java.lang.String archiveName)
Imports the specified extension archive from the Fabric node with which the connection established.
|
void |
importPackage(java.lang.String packageName)
Imports all archives of the specified Package from the Fabric node with which the connection established.
|
void |
importSemanticType(java.lang.String typeName)
Imports the specified Semantic Type from the Fabric node with which the connection established.
|
boolean |
isBoundEventId(java.lang.String eventId)
Checks if the specified event identifier is bound to the connection.
|
boolean |
isOpened()
Checks if the connection is opened.
|
boolean |
isReconnecting()
Checks if the remote node has disconnected and the connection is ready for reconnecting (or reconnecting is in progress).
|
boolean |
isReopenOnAnyCall()
Returns if reopen on any call enabled or not.
|
boolean |
isSecurityEnabled()
Checks if the security is enabled in the Fabric.
|
FabricGroupLink |
joinGroup(java.lang.String groupName)
Joins the specified group.
|
void |
leaveGroup(java.lang.String groupName)
Leaves the specified group.
|
java.util.List |
listBoundEventIds()
Returns a list of event identifiers bound to the connection.
|
java.util.List |
listEventAsyncConsumers()
Returns a list of names of all event asynchronous consumers of this connection.
|
java.util.List |
listEventConsumers()
Returns a list of names of all event consumers of this connection.
|
java.util.List |
listEventReceivers()
Returns a list of names of all event receivers of this connection.
|
java.util.List |
listGroups()
Returns a list of the names of all groups to which the connection has joined.
|
java.util.List |
listOrganizations()
Returns a list of names of all organizations in the target node sysplex.
|
java.util.List |
listRequestConsumers()
Returns a list of names of all event request consumers of this connection.
|
void |
log(Trace.Level level,
java.lang.String message,
java.lang.Object[] args) |
long |
nextGlobalCount()
Increments the
Global Counter and returns its new value. |
void |
open()
Opens the connection.
|
void |
open(long timeout)
Opens the remote connection with the specified timeout (in seconds) using the list of URls (@see
FabricConnection.addURL(String) . |
PingResult |
ping()
Checks if a destination specified by the
URL parameter is available. |
void |
raiseAcknowledgement(AcknowledgementEvent event,
EventScope eventScope,
long timeToLive)
Raises the specified acknowledgment event.
|
void |
raiseAdvisory(AdvisoryEventDatagram event,
EventScope eventScope)
Raises the specified advisory event.
|
void |
raiseEvent(ImmutableEventDatagram event,
EventScope eventScope,
long timeToLive)
Raises the specified event.
|
void |
raiseException(ExceptionEventDatagram event,
EventScope eventScope)
Raises the specified exception event.
|
AcknowledgementEvent |
raiseRequest(EventDatagram request,
EventScope eventScope,
RequestDistributionStrategy distributionStrategy,
ReplyMatchStrategy matchStrategy,
long timeout)
Raises the specified request and waits until a reply will be received or timeout period will expire.
|
ImmutableEventDatagram |
raiseRequest(RequestConsumerReference consumer,
ImmutableEventDatagram request,
long timeout)
Raises the specified request and waits until a reply will be received or waiting period expires.
|
ImmutableEventDatagram |
raiseRequest(java.lang.String consumerName,
ImmutableEventDatagram request,
long timeout)
Raises the specified request and waits until a reply will be received or waiting period expires.
|
void |
removeEventCache(java.lang.String eventFilter)
Removes an event cache associated with the specified simple event filter.
|
void |
removeStateEventListener(HTTPFabricConnectionStateEventListener listener) |
void |
removeURL(java.lang.String url)
Removes the specified URLs from the list of URLs.
|
long |
resetGlobalCounter()
Resets the
Global Counter , setting its value to 1 . |
void |
setAsyncConsumerAndSLMessageTimeoutsForReverseMonitorMs(long asyncConsumerAndSLMessageTimeoutsForReverseMonitorMs)
Sets the timeout for async consumers and SLMessages used by reverse thread monitor to detect if reverse thread ie being hung or not.
|
void |
setClientId(ClientId clientId)
Sets the specified connection Client ID.
|
void |
setConnectionReopenInterval(long connectionReopenInterval)
Sets a time in seconds between unsuccessful connection reopen retries.
|
void |
setDescription(java.lang.String description)
Sets the specified connection description.
|
void |
setDomainConstraint(DomainConstraint domain)
Updates the existing domain obtained by the method
#createDomainConstraint(String)
or FabricConnection.getDomainConstraint(String) . |
void |
setEventScope(EventScope eventScope)
Sets the specified event scope.
|
void |
setExceptionListener(FabricEventListener listener)
Sets the listener that will process all exception events raised in the node or sysplex.
|
void |
setExceptionStrategy(ExceptionStrategy exceptionStrategy)
Sets the specified exception strategy of the connection.
|
void |
setFileTransfersDirectConsumersTimeout(long fileTransfersDirectConsumersTimeoutMs)
Sets timeout for file transfers from remote node and direct consumers in milliseconds.
|
void |
setHttpTimeout(int httpTimeoutMs)
Sets http timeout in milliseconds.
|
void |
setLeasePeriod(long leasePeriod)
Updates lease period value.
|
void |
setMaxRetriesCount(int maxRetriesCount)
Sets how much times we should retry http request if it was failed with IO exception.
|
void |
setName(java.lang.String name)
Sets the specified connection name.
|
void |
setPassword(java.lang.String password)
Sets the specified user password of the connection.
|
void |
setRangeConstraint(RangeConstraint range)
Updates the existing range obtained by the method
FabricConnection.createRangeConstraint(String, String, Object, Object)
or FabricConnection.getRangeConstraint(String) . |
void |
setReconnectAttempts(int reconnectAttempts)
Sets a number of reconnect attempts that will be made by the connection in a case of the remote node disconnection.
|
void |
setReconnectInterval(long reconnectInterval)
Sets a time (in seconds) between successive reconnect attempts that will be made by the connection
in a case of the remote node disconnection.
|
void |
setReopenOnAnyCall(boolean reopenOnAnyCall)
Sets if lost connection should be reopened on any call.
|
void |
setReverseCallableExecutor(HTTPFabricConnection.ReverseCallableExecutor reverseCallableExecutor) |
void |
setReverseConnectionHoldTimeout(long reverseConnectionHoldTimeoutMs)
Sets a time(in milliseconds) how long reverse connection
will hold on server side without any data sent.
|
void |
setReverseReplyTimeout(long reverseReplyTimeoutMs)
Sets reverse reply timeout in milliseconds.
|
void |
setSecurityToken(java.lang.String token)
Sets the specified
Web Application Token for the connection. |
void |
setType(java.lang.String type) |
void |
setUserName(java.lang.String user)
Sets the specified user name of the connection.
|
void |
setUseSeparateClassLoader(boolean useSeparateClassLoader)
Sets to use current thread class loader or separate URL class loader located upper current thread class loader.
|
long |
showGlobalCounter()
Returns the current value of the
Global Counter . |
java.lang.String |
toString() |
void |
unbindProducerFor(java.lang.String eventId)
Unbinds the specified event identifier from the connection.
|
public static final int DEFAULT_HTTP_TIMEOUT_IN_MS
public static final int DEFAULT_FILE_TRANSFERS_DIRECT_CONSUMERS_TIMEOUT_IN_MS
public static final int DEFAULT_REVERSE_HOLD_TIMEOUT_MS
public static final int DEFAULT_REVERSE_REPLY_TIMEOUT_MS
public static final long DEFAULT_LEASE_TIMEOUT
public static final java.lang.String MAGIC
public static final java.lang.String FABRIC_REALM
public static final java.lang.String FABRIC_URL
public static final java.lang.String FABRIC_SESSION
public JSONSerializer.JsonSerializerBuilderImpl createJSONSerializerBuilder(java.lang.String name)
public JSONSerializer createJSONSerializer(java.lang.String name)
public void setUseSeparateClassLoader(boolean useSeparateClassLoader)
useSeparateClassLoader
- if true separate class loader is usedpublic java.lang.ClassLoader getClassLoader()
public long getReverseReplyTimeout()
public void setReverseReplyTimeout(long reverseReplyTimeoutMs)
setReverseConnectionHoldTimeout
otherwise will be rewritten.reverseReplyTimeoutMs
- timeout in millisecondspublic void setReverseConnectionHoldTimeout(long reverseConnectionHoldTimeoutMs)
reverseReplyTimeoutMs
timeout.reverseConnectionHoldTimeoutMs
- timeout in millisecondspublic long getReverseConnectionHoldTimeout()
public long getHttpTimeout()
public void setHttpTimeout(int httpTimeoutMs)
setFileTransfersDirectConsumersTimeout(long)
after @setHttpTimeout(int)
.httpTimeoutMs
- public long getFileTransfersDirectConsumersTimeout()
public void setFileTransfersDirectConsumersTimeout(long fileTransfersDirectConsumersTimeoutMs)
fileTransfersDirectConsumersTimeoutMs
- public void setAsyncConsumerAndSLMessageTimeoutsForReverseMonitorMs(long asyncConsumerAndSLMessageTimeoutsForReverseMonitorMs)
asyncConsumerAndSLMessageTimeoutsForReverseMonitorMs
- public long getAsyncConsumerAndSLMessageTimeoutsForReverseMonitorMs()
public void enableReverseThreadMonitor(boolean enabled)
enabled
- public long getLeasePeriod()
public void setLeasePeriod(long leasePeriod)
leasePeriod
- in mspublic void setMaxRetriesCount(int maxRetriesCount)
maxRetriesCount
- public int getMaxRetriesCount()
public void setReopenOnAnyCall(boolean reopenOnAnyCall)
reopenOnAnyCall
- public boolean isReopenOnAnyCall()
public boolean isOpened()
FabricConnection
isOpened
in interface FabricConnection
true
if the connection is opened, false
otherwise.public long getTimestamp()
FabricConnection
-1
if the connection is not yet opened (or the opening was not successful).
Returns the time of a last successful reconnection if it is available.
This ability is applicable to the Client Context only (i.e. for remote connections).
getTimestamp
in interface FabricConnection
public void open() throws HTTPFabricException
FabricConnection
FabricConnection.open(long)
will be invoked with the default timeout (10 seconds).
Client Context in one JVM allows opening connections with nodes belonging to just one Fabric (sysplex). So, if there are connections established with one sysplex it is impossible to open a new connection to another sysplex in this JVM.
open
in interface FabricConnection
HTTPFabricException
public void open(long timeout) throws FabricConnectionException, SecurityManagerException
FabricConnection
FabricConnection.addURL(String)
.
This method is applicable to the Client Context only (i.e. for remote connections).
Client Context in one JVM allows opening connections with nodes belonging to just one Fabric (sysplex).
So, if there are connections established with one sysplex it is impossible to open a new connection to another sysplex in this JVM.
open
in interface FabricConnection
timeout
- the timeout value (in seconds).FabricConnectionException
- if some error occurs during the connection opening.SecurityManagerException
- if the authentication fails due to invalid user name or password.public void close() throws HTTPFabricException
FabricConnection
EventAsyncConsumer.DEFAULT_CLOSE_TIMEOUT
milliseconds until remaining events
in all asynchronous consumers will be processed and closes them after that.
close({@link EventAsyncConsumer#DEFAULT_CLOSE_TIMEOUT})
.close
in interface FabricConnection
HTTPFabricException
public void close(long timeout) throws HTTPFabricException
FabricConnection
close
in interface FabricConnection
timeout
- the wait time (in milliseconds) for closing all asynchronous consumers.HTTPFabricException
public void closeQuiet()
public void forceClose() throws HTTPFabricException
FabricConnection
close(0)
.forceClose
in interface FabricConnection
HTTPFabricException
public ClientId getClientId()
FabricConnection
getClientId
in interface FabricConnection
public java.lang.String getDescription()
FabricConnection
getDescription
in interface FabricConnection
public EventScope getEventScope()
FabricConnection
getEventScope
in interface FabricConnection
public FabricAddress getFabricAddress() throws HTTPFabricException
FabricConnection
This method will return null
if the connection has LOCAL
event scope.
getFabricAddress
in interface FabricConnection
HTTPFabricException
public java.lang.String getName()
FabricConnection
getName
in interface FabricConnection
public java.lang.String getType()
FabricConnection
getType
in interface FabricConnection
public java.lang.String getURL()
FabricConnection
getURL
in interface FabricConnection
null
if the connection is not opened.public java.lang.String getSessionId()
public java.lang.String getUserName()
FabricConnection
getUserName
in interface FabricConnection
public void setClientId(ClientId clientId) throws HTTPFabricException
FabricConnection
clientId
will be used as connection name:
setName(clientId.toString());
.setClientId
in interface FabricConnection
clientId
- the Client ID to be set.HTTPFabricException
public void setDescription(java.lang.String description) throws HTTPFabricException
FabricConnection
setDescription
in interface FabricConnection
description
- the description to be set.HTTPFabricException
public void setEventScope(EventScope eventScope) throws HTTPFabricException
FabricConnection
setEventScope
in interface FabricConnection
eventScope
- the event scope to be set.HTTPFabricException
public void setName(java.lang.String name) throws HTTPFabricException
FabricConnection
setName
in interface FabricConnection
name
- the name to be set.HTTPFabricException
public void addURL(java.lang.String url) throws HTTPFabricException
FabricConnection
If this list contains only local URLs (tlp://local
) other URLs cannot be added.
And vice versa, a local URL cannot be added to the list containing non-local URLs.
Non-local URLs must have the following format: <Protocol>://<Host>:<Port>
(e.g. tlp://localhost:5000
).
addURL
in interface FabricConnection
url
- the URL to be added.HTTPFabricException
public void removeURL(java.lang.String url) throws HTTPFabricException
FabricConnection
removeURL
in interface FabricConnection
url
- the URL to be removed.HTTPFabricException
public java.util.List getURLs()
FabricConnection
getURLs
in interface FabricConnection
public int getReconnectAttempts()
FabricConnection
Value 0
means that the connection will not attempt to reconnect.
Negative value means that the connection will try to reconnect infinitely (until successful connecting).
Default value is -1
.
This method is applicable to the Client Context only (i.e. for remote connections).
getReconnectAttempts
in interface FabricConnection
public void setReconnectAttempts(int reconnectAttempts)
FabricConnection
Value 0
means that the connection will not attempt to reconnect.
Negative value means that the connection will try to reconnect infinitely (until successful connecting).
This method is applicable to the Client Context only (i.e. for remote connections).
setReconnectAttempts
in interface FabricConnection
reconnectAttempts
- the value to be set.public long getReconnectInterval()
FabricConnection
Default value is 30L
.
This method is applicable to the Client Context only (i.e. for remote connections).
getReconnectInterval
in interface FabricConnection
public void setReconnectInterval(long reconnectInterval)
FabricConnection
This method is applicable to the Client Context only (i.e. for remote connections).
setReconnectInterval
in interface FabricConnection
reconnectInterval
- the value to be set.public long getConnectionReopenInterval()
public void setConnectionReopenInterval(long connectionReopenInterval)
connectionReopenInterval
- timeout in secondspublic boolean isReconnecting()
FabricConnection
This method is applicable to the Client Context only (i.e. for remote connections).
isReconnecting
in interface FabricConnection
true
if the connection is currently reconnecting to the remote node, false
otherwise.public void setType(java.lang.String type)
public void setUserName(java.lang.String user) throws HTTPFabricException
FabricConnection
setUserName
in interface FabricConnection
user
- the user name to be set.HTTPFabricException
public void setPassword(java.lang.String password) throws HTTPFabricException
FabricConnection
setPassword
in interface FabricConnection
password
- the user password to be set.HTTPFabricException
public void setSecurityToken(java.lang.String token) throws FabricConnectionException
FabricConnection
Web Application Token
for the connection.
null
(by default) or an empty string, the user credentials are used.setSecurityToken
in interface FabricConnection
token
- the security token to be set.FabricConnectionException
- if the connection is opened.public void addSemanticType(java.lang.Class typeClass) throws FactoryManagerException
FactoryManagerException
public ObjectMediationAliasManager getAliasManager()
public HTTPEventFactory getEventFactory()
public void acknowledgeEvent(EventDatagram event, boolean withSourceData, AcknowledgeAction action, java.lang.String recipientId, EventScope eventScope, long timeToLive) throws HTTPFabricException
FabricConnection
acknowledgeEvent
in interface FabricConnection
event
- the event for which the acknowledgement will be raised.withSourceData
- the flag indicating if the event data will be copied into the acknowledgement event.action
- the action which will be made after raising of the acknowledgement.recipientId
- the identifier of the acknowledgement recipient.eventScope
- the scope of the raised acknowledgement.timeToLive
- the time interval (in milliseconds) within that the event persists (in a queue, cache or internal buffer)
before it will be discarded. Non-positive value implies ignoring of this parameter.
HTTPFabricException
public void acknowledgeException(ExceptionEventDatagram ex, AcknowledgeAction action, java.lang.String recipientId, EventScope eventScope, long timeToLive) throws HTTPFabricException
FabricConnection
acknowledgeException
in interface FabricConnection
ex
- the event for which the acknowledgement will be raised.action
- the action which will be made after the raising.recipientId
- the identifier of a recipient of the acknowledgement.eventScope
- the scope of the raised acknowledgement.timeToLive
- the time interval (in milliseconds) within that the event persists (in a queue, cache or internal buffer)
before it will be discarded. Non-positive value implies ignoring of this parameter.
HTTPFabricException
public void addEventCache(java.lang.String eventFilter, int maxSize, CacheThresholdAction thresholdAction) throws HTTPFabricException
FabricConnection
Since an event cache always has GLOBAL
event scope, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
addEventCache
in interface FabricConnection
eventFilter
- the simple event filter associated with the cache.maxSize
- the cache size (maximum number of events which the cache can contain).thresholdAction
- the type of action which is performed if the cache is overflowed.HTTPFabricException
public void bindProducerFor(java.lang.String eventId) throws HTTPFabricException
FabricConnection
The method will fail if an event prototype associated with the specified event does not exist.
See PrototypeFactory
to get information about operations with event prototypes.
bindProducerFor
in interface FabricConnection
eventId
- the event id to be bound.HTTPFabricException
public DomainConstraint createDomainConstraint(java.lang.String domainName, java.lang.String description, java.util.Set values) throws HTTPFabricException
FabricConnection
String
Byte
Short
Integer
Long
Float
Double
BigDecimal
Date
Changing the returned object will have no effect until the method
FabricConnection.setDomainConstraint(DomainConstraint)
is invoked for this object.
createDomainConstraint
in interface FabricConnection
domainName
- the domain name.description
- the domain description.values
- the domain values.HTTPFabricException
public RangeConstraint createRangeConstraint(java.lang.String rangeName, java.lang.String description, java.lang.Object minValue, java.lang.Object maxValue) throws HTTPFabricException
FabricConnection
Number
Date
Changing the returned object will have no effect until the method
FabricConnection.setRangeConstraint(RangeConstraint)
is invoked for this object.
createRangeConstraint
in interface FabricConnection
rangeName
- the range name.description
- the range description.minValue
- the min boundary value of the range.maxValue
- the max boundary value of the range.HTTPFabricException
public HTTPEventAsyncConsumer createEventAsyncConsumer(java.lang.String consumerName, FabricEventListener listener, java.lang.String eventFilter, java.lang.String eventSelector, EventScope eventScope, boolean noLocal) throws HTTPFabricException
FabricConnection
QUEUE DEPTH
, DELIVERY WAIT
and FLOW CONTROL
strategies may be configured prior to starting the consumer.createEventAsyncConsumer
in interface FabricConnection
consumerName
- the name of the consumer.listener
- the listener associated with the consumer.eventFilter
- the event filter of the consumer.eventSelector
- the event selector of the consumer.
Selector allows to specify almost any conditions on event properties which should
be satisfied for an event to be consumed.
See EventDispatcher
for details.eventScope
- the event scope of the consumer.noLocal
- true
if the consumer will not process events raised by this connection.HTTPFabricException
public com.streamscape.cli.http.HTTPEventConsumer createEventConsumer(java.lang.String consumerName, FabricEventListener listener, java.lang.String eventFilter, java.lang.String eventSelector, EventScope eventScope, boolean noLocal) throws HTTPFabricException
FabricConnection
createEventConsumer
in interface FabricConnection
consumerName
- the name of the consumer.listener
- the listener associated with the consumer.eventFilter
- the event filter of the consumer.eventSelector
- the event selector of the consumer.
Selector allows to specify almost any conditions on event properties which should
be satisfied for an event to be consumed.
See EventDispatcher
for details.eventScope
- the event scope of the consumer.noLocal
- true
if the consumer will not process events raised by this connection.HTTPFabricException
public EventReceiver createEventReceiver(java.lang.String receiverName, java.lang.String eventFilter, java.lang.String eventSelector, EventScope eventScope, boolean noLocal) throws HTTPFabricException
FabricConnection
createEventReceiver
in interface FabricConnection
receiverName
- the name of the receiver.eventFilter
- the event filter of the receiver.eventSelector
- the event selector of the receiver.
Selector allows to specify almost any conditions on event properties which should
be satisfied for an event to be received.
See EventDispatcher
for details.eventScope
- the event scope of the receiver.noLocal
- true
if the receiver will not get events raised by this connection.HTTPFabricException
public SLSession createSLSession() throws HTTPFabricException
FabricConnection
Semantic Language
session to the current node.
createSLSession(null)
.
This method will return null
if the connection has LOCAL
event scope.
createSLSession
in interface FabricConnection
HTTPFabricException
public SLSession createSLSession(java.lang.String nodeName) throws HTTPFabricException
FabricConnection
Semantic Language
session to the Fabric node with the specified name.
nodeName
is null
, the session will be created to the current node.
This method will return null
if the connection has LOCAL
event scope.
createSLSession
in interface FabricConnection
nodeName
- the node name to which the session will be created.HTTPFabricException
public ServiceAccessor createServiceAccessor(java.lang.String serviceType, java.lang.String serviceName) throws HTTPFabricException
FabricConnection
createServiceAccessor(null, serviceType, serviceName)
.
This method will return null
if the connection has LOCAL
event scope.
createServiceAccessor
in interface FabricConnection
serviceType
- the type of the accessed service.serviceName
- the name of the accessed service.HTTPFabricException
public ServiceAccessor createServiceAccessor(java.lang.String nodeName, java.lang.String serviceType, java.lang.String serviceName) throws HTTPFabricException
FabricConnection
This method will return null
if the connection has LOCAL
event scope.
createServiceAccessor
in interface FabricConnection
nodeName
- the node name in which the service will be looked up.serviceType
- the type of the accessed service.serviceName
- the name of the accessed service.HTTPFabricException
public void dropConsumer(java.lang.String consumerName) throws HTTPFabricException
FabricConnection
dropConsumer
in interface FabricConnection
consumerName
- the name of consumer to be dropped.HTTPFabricException
public void dropDomainConstraint(java.lang.String domainName) throws HTTPFabricException
FabricConnection
dropDomainConstraint
in interface FabricConnection
domainName
- the domain name.HTTPFabricException
public void dropRangeConstraint(java.lang.String rangeName) throws HTTPFabricException
FabricConnection
dropRangeConstraint
in interface FabricConnection
rangeName
- the range name.HTTPFabricException
public void dropEventAsyncConsumer(java.lang.String consumerName) throws HTTPFabricException
FabricConnection
EventAsyncConsumer.DEFAULT_CLOSE_TIMEOUT
seconds until all remaining events
in the underlying event queue will be processed and stops the delivery thread after that.dropEventAsyncConsumer
in interface FabricConnection
consumerName
- the name of consumer to be dropped.HTTPFabricException
public void dropEventConsumer(java.lang.String consumerName) throws HTTPFabricException
FabricConnection
dropEventConsumer
in interface FabricConnection
consumerName
- the name of consumer to be dropped.HTTPFabricException
public void dropEventReceiver(java.lang.String receiverName) throws HTTPFabricException
FabricConnection
dropEventReceiver
in interface FabricConnection
receiverName
- the name of the receiver to be dropped.HTTPFabricException
public AuthenticationType getAuthenticationType() throws HTTPFabricException
FabricConnection
getAuthenticationType
in interface FabricConnection
HTTPFabricException
public DomainConstraint getDomainConstraint(java.lang.String domainName) throws HTTPFabricException
FabricConnection
Changing the returned object will have no effect until the method
FabricConnection.setDomainConstraint(DomainConstraint)
is invoked for this object.
getDomainConstraint
in interface FabricConnection
domainName
- the domain name.null
if the corresponding domain is not found.HTTPFabricException
public RangeConstraint getRangeConstraint(java.lang.String rangeName) throws HTTPFabricException
FabricConnection
Changing the returned object will have no effect until the method
FabricConnection.setRangeConstraint(RangeConstraint)
is invoked for this object.
getRangeConstraint
in interface FabricConnection
rangeName
- the range name.null
if the corresponding range is not found.HTTPFabricException
public EventAsyncConsumer getEventAsyncConsumer(java.lang.String consumerName)
FabricConnection
getEventAsyncConsumer
in interface FabricConnection
consumerName
- the name of consumer which is to be found.null
if consumer is not found.public EventConsumer getEventConsumer(java.lang.String consumerName)
FabricConnection
getEventConsumer
in interface FabricConnection
consumerName
- the name of consumer which should be found.null
if consumer was not found.public EventReceiver getEventReceiver(java.lang.String receiverName)
FabricConnection
getEventReceiver
in interface FabricConnection
receiverName
- the name of receiver which is to be found.null
if receiver is not found.public Moderator getModerator() throws HTTPFabricException
FabricConnection
This method will return null
if the connection has LOCAL
event scope.
getModerator
in interface FabricConnection
HTTPFabricException
public ComponentReference getComponentReference() throws HTTPFabricException
FabricConnection
ComponentReference
associated with the connection.
This method will return null
if the connection has LOCAL
event scope.
getComponentReference
in interface FabricConnection
HTTPFabricException
public SecurityManager getSecurityManager() throws HTTPFabricException
FabricConnection
In the Runtime Context this method will fail if the connection is not opened.
In the Client Context a security manager, obtained from the non-opened connection, will have privileges of anonymous user
(only the method SecurityManager.createUser(String, String, String)
will be allowed).
This method will return null
if the connection has LOCAL
event scope.
getSecurityManager
in interface FabricConnection
HTTPFabricException
public boolean hasBoundEventIds() throws HTTPFabricException
FabricConnection
hasBoundEventIds
in interface FabricConnection
true
if the connection has bound event ids, false
otherwise.HTTPFabricException
public boolean isBoundEventId(java.lang.String eventId) throws HTTPFabricException
FabricConnection
isBoundEventId
in interface FabricConnection
eventId
- the event id to be checked.true
if the event id is bound to the connection, false
otherwise.HTTPFabricException
public boolean isSecurityEnabled() throws HTTPFabricException
FabricConnection
This method will always return false
if the connection has LOCAL
event scope.
isSecurityEnabled
in interface FabricConnection
true
if the security is enabled, false
otherwise.HTTPFabricException
public java.util.List listBoundEventIds() throws HTTPFabricException
FabricConnection
listBoundEventIds
in interface FabricConnection
HTTPFabricException
public ExceptionStrategy getExceptionStrategy() throws FabricConnectionException
FabricConnection
EventConsumer
)
during a processing of events raised by the connection.getExceptionStrategy
in interface FabricConnection
FabricConnectionException
- if the connection is not opened.public void setExceptionStrategy(ExceptionStrategy exceptionStrategy) throws FabricConnectionException
FabricConnection
EventConsumer
)
during a processing of events raised by the connection.setExceptionStrategy
in interface FabricConnection
exceptionStrategy
- the exception strategy to be set.FabricConnectionException
- if the connection is not opened.public java.util.List listEventAsyncConsumers() throws HTTPFabricException
FabricConnection
listEventAsyncConsumers
in interface FabricConnection
HTTPFabricException
public java.util.List listEventConsumers() throws HTTPFabricException
FabricConnection
listEventConsumers
in interface FabricConnection
HTTPFabricException
public java.util.List listEventReceivers() throws HTTPFabricException
FabricConnection
listEventReceivers
in interface FabricConnection
HTTPFabricException
public PingResult ping()
FabricConnection
URL
parameter is available.
FabricConnection.addURL(String)
method.
This method will always return UNAVAILABLE
if the connection has LOCAL
event scope.
ping
in interface FabricConnection
public void raiseAcknowledgement(AcknowledgementEvent event, EventScope eventScope, long timeToLive) throws HTTPFabricException
FabricConnection
raiseAcknowledgement
in interface FabricConnection
event
- the event to be raised.eventScope
- the scope of the raised event.timeToLive
- the time interval (in milliseconds) within that the event persists (in a queue, cache or internal buffer)
before it will be discarded. Non-positive value implies ignoring of this parameter.
HTTPFabricException
public void raiseAdvisory(AdvisoryEventDatagram event, EventScope eventScope) throws HTTPFabricException
FabricConnection
raiseAdvisory
in interface FabricConnection
event
- the event to be raised.eventScope
- the scope of the raised event.HTTPFabricException
public void raiseEvent(ImmutableEventDatagram event, EventScope eventScope, long timeToLive) throws HTTPFabricException
FabricConnection
raiseEvent
in interface FabricConnection
event
- the event to be raised.eventScope
- the scope of the raised event.timeToLive
- the time interval (in milliseconds) within that the event persists (in a queue, cache or internal buffer)
before it will be discarded. Non-positive value implies ignoring of this parameter.
HTTPFabricException
public void raiseException(ExceptionEventDatagram event, EventScope eventScope) throws HTTPFabricException
FabricConnection
raiseException
in interface FabricConnection
event
- the exception event to be raised.eventScope
- the scope of the raised exception.HTTPFabricException
public ImmutableEventDatagram raiseRequest(java.lang.String consumerName, ImmutableEventDatagram request, long timeout) throws HTTPFabricException
consumerName
- the consumer name which will process the request.request
- the request to be raised.timeout
- the waiting time for reply (in milliseconds).FabricConnectionException
- if the connection is not opened or
if the user has insufficient rights to perform this operation.FabricEventSourceException
- if some error occurs in the Exchange.FabricUnboundEventException
- if the specified event is not bound to the connection.FabricRequestException
- if some error occurs during processing of the request in the listener.HTTPFabricException
public ImmutableEventDatagram raiseRequest(RequestConsumerReference consumer, ImmutableEventDatagram request, long timeout) throws HTTPFabricException
FabricConnection
raiseRequest
in interface FabricConnection
consumer
- the consumer which will process the request.request
- the request to be raised.timeout
- the waiting time for reply (in milliseconds).HTTPFabricException
public AcknowledgementEvent raiseRequest(EventDatagram request, EventScope eventScope, RequestDistributionStrategy distributionStrategy, ReplyMatchStrategy matchStrategy, long timeout) throws HTTPFabricException
FabricConnection
Only AUCTION
distribution strategy is supported at present.
raiseRequest
in interface FabricConnection
request
- the request to be raised.eventScope
- the scope of the raised request.distributionStrategy
- the strategy used for a distribution of the request.matchStrategy
- the strategy used for a matching of the reply.timeout
- the waiting time for reply (in milliseconds).HTTPFabricException
public void removeEventCache(java.lang.String eventFilter) throws HTTPFabricException
FabricConnection
Since an event cache always has GLOBAL
event scope, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
removeEventCache
in interface FabricConnection
eventFilter
- the simple event associated with the cache.HTTPFabricException
public EventCache getEventCache(java.lang.String eventFilter) throws FabricConnectionException
FabricConnection
Since an event cache always has GLOBAL
event scope, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
getEventCache
in interface FabricConnection
eventFilter
- the event filter associated with the cache.null
if the cache is not found.FabricConnectionException
- if the connection is not opened or
if the user has insufficient rights to perform this operation or
if the connection has LOCAL
or OBSERVABLE
event scope.public void setDomainConstraint(DomainConstraint domain) throws HTTPFabricException
FabricConnection
#createDomainConstraint(String)
or FabricConnection.getDomainConstraint(String)
.setDomainConstraint
in interface FabricConnection
domain
- the domain to be updated.HTTPFabricException
public void setRangeConstraint(RangeConstraint range) throws HTTPFabricException, FabricEventDispatcherException
FabricConnection
FabricConnection.createRangeConstraint(String, String, Object, Object)
or FabricConnection.getRangeConstraint(String)
.setRangeConstraint
in interface FabricConnection
range
- the range to be updated.FabricEventDispatcherException
- if some error occurs in the Exchange.HTTPFabricException
public void unbindProducerFor(java.lang.String eventId) throws HTTPFabricException
FabricConnection
unbindProducerFor
in interface FabricConnection
eventId
- the event id to be unbound.HTTPFabricException
public DataspaceAccessor createDataspaceAccessor(DataspaceType dataspaceType, java.lang.String dataspaceName) throws HTTPFabricException
FabricConnection
createDataspaceAccessor(null, dataspaceType, dataspaceName)
.
This method will return null
if the connection has LOCAL
event scope.
createDataspaceAccessor
in interface FabricConnection
dataspaceType
- the type of the accessed dataspace.dataspaceName
- the name of the accessed dataspace.HTTPFabricException
public DataspaceAccessor createDataspaceAccessor(java.lang.String nodeName, DataspaceType dataspaceType, java.lang.String dataspaceName) throws HTTPFabricException
FabricConnection
This method will return null
if the connection has LOCAL
event scope.
createDataspaceAccessor
in interface FabricConnection
nodeName
- the node name in which the dataspace will be looked up.dataspaceType
- the type of a dataspace to which the accessor will be created.dataspaceName
- the name of a dataspace to which the accessor will be created.HTTPFabricException
public java.util.List listRequestConsumers() throws HTTPFabricException
FabricConnection
listRequestConsumers
in interface FabricConnection
HTTPFabricException
public EventRequestConsumer getRequestConsumer(java.lang.String consumerName) throws HTTPFabricException
FabricConnection
getRequestConsumer
in interface FabricConnection
consumerName
- the name of consumer which is to be found.null
if consumer was not found.HTTPFabricException
public EventRequestConsumer createRequestConsumer(java.lang.String consumerName, FabricRequestListener listener, EventScope eventScope) throws HTTPFabricException
FabricConnection
createRequestConsumer
in interface FabricConnection
consumerName
- the name of the consumer.listener
- the listener associated with the consumer.eventScope
- the event scope of the consumer. It cannot be LOCAL
.HTTPFabricException
public void dropRequestConsumer(java.lang.String consumerName) throws HTTPFabricException
FabricConnection
dropRequestConsumer
in interface FabricConnection
consumerName
- the name of consumer to be dropped.HTTPFabricException
public RepositoryAccessor getRepositoryAccessor() throws HTTPFabricException
FabricConnection
getRepositoryAccessor(null)
.
This method will return null
if the connection has LOCAL
event scope.
getRepositoryAccessor
in interface FabricConnection
HTTPFabricException
public RepositoryAccessor getRepositoryAccessor(java.lang.String nodeName) throws HTTPFabricException
FabricConnection
This method will return null
if the connection has LOCAL
event scope.
getRepositoryAccessor
in interface FabricConnection
nodeName
- the name of the node in which the repository locates.HTTPFabricException
public FabricGroupManager getGroupManager() throws FabricConnectionException
FabricConnection
Since a group always has GLOBAL
event scope, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
getGroupManager
in interface FabricConnection
FabricConnectionException
- if the connection is not opened or
if the user has insufficient rights to perform this operation or
if the connection has LOCAL
or OBSERVABLE
event scope.public FabricGroupLink joinGroup(java.lang.String groupName)
FabricConnection
Since a group always has GLOBAL
event scope, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
joinGroup
in interface FabricConnection
groupName
- the name of the group.public void leaveGroup(java.lang.String groupName)
FabricConnection
Since a group always has GLOBAL
event scope, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
leaveGroup
in interface FabricConnection
groupName
- the name of the specified group.public FabricGroupLink getGroupLink(java.lang.String groupName)
FabricConnection
Since a group always has GLOBAL
event scope, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
getGroupLink
in interface FabricConnection
groupName
- the name of the group.null
if the connection is not a member of this group.public java.util.List listGroups() throws FabricConnectionException
FabricConnection
Since a group always has GLOBAL
event scope, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
listGroups
in interface FabricConnection
FabricConnectionException
- if the connection is not opened or
if the user has insufficient rights to perform this operation or
if the connection has LOCAL
or OBSERVABLE
event scope.public void setExceptionListener(FabricEventListener listener) throws FabricConnectionException, FabricEventDispatcherException
FabricConnection
INHERITED
event scope.
If the specified listener is null
the previous listener is nullified (i.e. associated consumer is removed).
setExceptionListener
in interface FabricConnection
listener
- the listener to be set.FabricConnectionException
- if the connection is not opened.FabricEventDispatcherException
- if some error occurs in the Exchange.public FabricEventListener getExceptionListener()
FabricConnection
getExceptionListener
in interface FabricConnection
public void exportExtensionArchive(java.io.File jarFile) throws HTTPFabricException
FabricConnection
ext
area of the Repository.
Since this operation has impact on the whole Fabric, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
This method is applicable to the Client Context only (i.e. for remote connections).
exportExtensionArchive
in interface FabricConnection
jarFile
- the JAR file to be exported.HTTPFabricException
public void importExtensionArchive(java.lang.String archiveName) throws HTTPFabricException
FabricConnection
ext
area of the Repository.
This method will throw exception if the connection has LOCAL
event scope.
This method is applicable to the Client Context only (i.e. for remote connections).
importExtensionArchive
in interface FabricConnection
archiveName
- the name of archive to be imported.HTTPFabricException
public void importPackage(java.lang.String packageName) throws HTTPFabricException
FabricConnection
sdo.TestPackage
).
lib
area of the Repository.
This method will throw exception if the connection has LOCAL
event scope.
This method is applicable to the Client Context only (i.e. for remote connections).
importPackage
in interface FabricConnection
packageName
- the name of package to be imported.HTTPFabricException
public void exportSemanticType(java.lang.String typeName)
FabricConnection
Since this operation has impact on the whole Fabric, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
This method is applicable to the Client Context only (i.e. for remote connections).
exportSemanticType
in interface FabricConnection
typeName
- the name of semantic type to be exported.public void importSemanticType(java.lang.String typeName) throws HTTPFabricException
FabricConnection
This method will throw exception if the connection has LOCAL
event scope.
This method is applicable to the Client Context only (i.e. for remote connections).
importSemanticType
in interface FabricConnection
typeName
- the name of semantic type to be imported.HTTPFabricException
public void exportEventPrototype(java.lang.String eventId)
FabricConnection
This method will throw exception if the connection has LOCAL
event scope.
This method is applicable to the Client Context only (i.e. for remote connections).
exportEventPrototype
in interface FabricConnection
eventId
- the event id of prototype to be exported.public void importEventPrototype(java.lang.String eventId) throws FabricConnectionException, DatagramFactoryException
FabricConnection
Since this operation has impact on the whole Fabric, this method will throw exception
if the connection has LOCAL
or OBSERVABLE
event scope.
This method is applicable to the Client Context only (i.e. for remote connections).
importEventPrototype
in interface FabricConnection
eventId
- the event id of prototype to be imported.FabricConnectionException
- if the current context is a Runtime Context or
if the connection is not opened or
if the user has insufficient rights to perform this operation or
if the connection has LOCAL
event scope or
if some error occurs in the Exchange.DatagramFactoryException
- if the corresponding prototype already exists in the current context or
if the corresponding prototype does not exist in the Fabric node.public java.util.TimeZone getHostTimezone() throws FabricConnectionException
FabricConnection
getHostTimezone
in interface FabricConnection
FabricConnectionException
- if the connection is not opened.public java.util.TimeZone getNodeTimezone() throws FabricConnectionException
FabricConnection
FabricConnection.getHostTimezone()
).getNodeTimezone
in interface FabricConnection
FabricConnectionException
- if the connection is not opened.public java.nio.charset.Charset getCCSID() throws FabricConnectionException
FabricConnection
CCSID
configured in the current Fabric node.
CCSID
configured in the Dataspace Store.getCCSID
in interface FabricConnection
FabricConnectionException
- if the connection is not opened.public long nextGlobalCount() throws FabricConnectionException
FabricConnection
Global Counter
and returns its new value.
nextGlobalCount
in interface FabricConnection
FabricConnectionException
- if the connection is not opened or
if some error occurs in the Exchange.public long showGlobalCounter() throws FabricConnectionException
FabricConnection
Global Counter
.
showGlobalCounter
in interface FabricConnection
FabricConnectionException
- if the connection is not opened or
if some error occurs in the Exchange.public long resetGlobalCounter() throws FabricConnectionException
FabricConnection
Global Counter
, setting its value to 1
.
Only administrator can invoke this method.
resetGlobalCounter
in interface FabricConnection
0
).FabricConnectionException
- if the connection is not opened or
if the user has insufficient rights to perform this operation or
if some error occurs in the Exchange.public java.lang.String getRuntimeVersion()
public java.lang.String getSysplexDomain()
public java.lang.String getAcceptorName()
public java.util.List listOrganizations()
public void log(Trace.Level level, java.lang.String message, java.lang.Object[] args)
public java.lang.String toString()
toString
in class java.lang.Object
public void setReverseCallableExecutor(HTTPFabricConnection.ReverseCallableExecutor reverseCallableExecutor)
public void addStateEventListener(HTTPFabricConnectionStateEventListener listener)
public void removeStateEventListener(HTTPFabricConnectionStateEventListener listener)
public HTTPStatistics getStatistics()
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.