Platform SDK Java 8.5 API Reference

com.genesyslab.platform.clusterprotocol
Class ClusterProtocolImpl<P extends ClientChannel,B extends ProtocolBuilder<P,B>>

java.lang.Object
  extended by com.genesyslab.platform.clusterprotocol.AbstractClusterChannel<P>
      extended by com.genesyslab.platform.clusterprotocol.ClusterProtocolImpl<P,B>
Type Parameters:
P - the base client protocol type.
B - the base client protocol builder type.
All Implemented Interfaces:
ClusterProtocol, AsyncChannel, AsyncInvokerSupport, Channel, ChannelListenerSupport, ConfigurationSupport, ConnectionInvokerSupport, EndpointSupport, InputChannel, InterceptorSupport, MessageReceiver, MessageReceiverManagement, OutputChannel, Protocol, ProtocolDescriptionSupport, Receiver, ReceiverManagement, RequestChannel
Direct Known Subclasses:
EspClusterProtocol, EspEmailClusterProtocol, FlexChatClusterProtocol, UcsClusterProtocol

public abstract class ClusterProtocolImpl<P extends ClientChannel,B extends ProtocolBuilder<P,B>>
extends AbstractClusterChannel<P>
implements ClusterProtocol

Abstract implementation base of Cluster Protocol interface.
It's a common functionality for all specific Cluster Protocols.

See Also:
EspClusterProtocol, UcsClusterProtocol, EspEmailClusterProtocol, FlexChatClusterProtocol

Nested Class Summary
protected  class ClusterProtocolImpl.CompletionHelper<V,A>
           
protected  class ClusterProtocolImpl.RequestFutureWrapper
           
 
Nested classes/interfaces inherited from class com.genesyslab.platform.clusterprotocol.AbstractClusterChannel
AbstractClusterChannel.AsyncVisitor, AbstractClusterChannel.ChanelErrorVisitor, AbstractClusterChannel.ChannelClosedVisitor, AbstractClusterChannel.ChannelOpenVisitor, AbstractClusterChannel.IncomingMessageVisitor, AbstractClusterChannel.IntChannelListener, AbstractClusterChannel.InternalChannelCloseVisitor, AbstractClusterChannel.InternalChannelOpenVisitor, AbstractClusterChannel.IntMessageHandler, AbstractClusterChannel.IntOutputChannelListener, AbstractClusterChannel.IntWsHandler, AbstractClusterChannel.OutgoingMessageVisitor
 
Field Summary
protected  ClusterProtocolLoadBalancer loadBalancer
           
protected  ClusterProtocolPolicy protocolPolicy
           
 
Fields inherited from class com.genesyslab.platform.clusterprotocol.AbstractClusterChannel
endpoint, execService
 
Fields inherited from interface com.genesyslab.platform.commons.protocol.Receiver
DEF_INPUT_SIZE
 
Fields inherited from interface com.genesyslab.platform.commons.protocol.Channel
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
 
Constructor Summary
protected ClusterProtocolImpl(ProtocolBuilder<P,B> protocolBuilder, ClusterProtocolPolicy protocolPolicy, ClusterProtocolLoadBalancer loadBalancer)
           
 
Method Summary
 void addNodes(java.lang.Iterable<WSConfig> nodes)
          Adds collection of WarmStandby configurations as additional cluster protocol nodes.
 void addNodes(WSConfig... nodes)
          Adds list of WarmStandby configurations as additional cluster protocol nodes.
 void addNodesEndpoints(Endpoint... endpoints)
          Adds Endpoint's list as additional cluster protocol nodes.
 void addNodesEndpoints(java.lang.Iterable<Endpoint> endpoints)
          Adds Endpoint's collection as additional cluster protocol nodes.
protected  void addNodesImpl(java.lang.Iterable<WSConfig> nodes)
           
 void beginClose()
          Method is asynchronous.
 void beginOpen()
          Method is asynchronous.
 RequestFuture beginRequest(Message message)
          Starts request and exits.
 RequestFuture beginRequest(Message message, long timeout)
           
protected  Protocol chooseProtocol(Message request)
           
 void close(long timeout)
          Closes channel synchronously with given timeout.
<A> void
closeAsync(CompletionHandler<ChannelClosedEvent,? super A> handler, A attachment)
          Initiates connections close to all of the cluster nodes.
Provided Completion Handler will be notified when all cluster nodes connections got closed.
 void configure(ConnectionConfiguration config)
           
protected  P createProtocol()
           
protected  com.genesyslab.platform.clusterprotocol.ProtocolNodeRec createProtocolNode(WSConfig wsConfig)
           
 Message endRequest(RequestFuture future)
          Tries to finish request started with beginRequest().
 Message endRequest(RequestFuture future, long timeout)
          Tries to finish request started with beginRequest().
 java.util.List<Protocol> getAllNodesProtocols()
          Returns snapshot list of all cluster protocol nodes.
 ConnectionConfiguration getConfiguration()
           
 Endpoint getEndpoint()
           
 Protocol getNextAvailableProtocol()
          Returns reference to some opened instance of protocol in the cluster nodes pool in accordance to the LB strategy.
 Protocol getNextAvailableProtocol(Message message)
          Returns reference to some opened instance of protocol in the cluster nodes pool in accordance to the LB strategy for handling of the given request message.
 Protocol getNodeProtocol(int protocolId)
          Returns cluster protocol node instance by PSDK Protocol Id.
It may be useful in cases, when it is required to get particular server connection by ProtocolId of specific response, or unsolicited event message.
 Protocol getNodeProtocol(java.lang.String nodeName)
          Returns cluster protocol node instance by name of configured Endpoint or WSConfig.
 java.util.List<WSConfig> getNodesConfig()
          Returns list of cluster nodes connections configurations.
 java.util.List<Protocol> getOpenedNodesProtocols()
          Returns snapshot list of cluster protocol nodes, which are tracked as Opened at the moment.
 ProtocolDescription getProtocolDescription()
           
 int getProtocolId()
           
 ReferenceBuilder getReferenceBuilder()
           
 ChannelState getState()
          Returns channel state.
protected  void onChannelDisconnected(com.genesyslab.platform.clusterprotocol.ProtocolNodeRec protocolItem, WSDisconnectedEvent event)
           
protected  void onChannelFailure(com.genesyslab.platform.clusterprotocol.ProtocolNodeRec protocolItem, WSTriedUnsuccessfullyEvent event)
           
protected  void onChannelOpened(com.genesyslab.platform.clusterprotocol.ProtocolNodeRec protocolItem, WSOpenedEvent event)
           
 void open(long timeout)
          Initiates connections to the initialized set of cluster nodes.
Cluster Protocol will become Opened when at least one node is connected.
<A> void
openAsync(CompletionHandler<ChannelOpenedEvent,? super A> handler, A attachment)
          Initiates connections to the initialized set of cluster nodes.
The completion handler will be notified by the first connection open event.
 ClusterProtocolPolicy policy()
          Returns reference to the actual cluster protocol policy.
 void removeNodes(java.lang.Iterable<java.lang.String> names)
          Removes cluster protocol node(s) by given nodes names.
 void removeNodes(java.lang.String... names)
          Removes cluster protocol node(s) by given nodes names.
 Message request(Message message)
          Sends the message and waitResponse for response.
 Message request(Message message, long timeout)
          Sends the message and waitResponse for response or while specified timeout is elapsed.
<A> void
requestAsync(Message message, A attachment, CompletionHandler<Message,? super A> handler)
          Starts request and exits.
<A> void
requestAsync(Message message, A attachment, CompletionHandler<Message,? super A> handler, long timeout)
          Starts request and exits.
 void send(Message message)
          Sends message to remote party.
 void setConnectionInvoker(AsyncInvoker connectionInvoker)
          Deprecated. 
 void setEndpoint(Endpoint endpoint)
           
 void setInvoker(AsyncInvoker invoker)
          Deprecated. 
 void setNodes(java.lang.Iterable<WSConfig> nodes)
          Sets or resets actual cluster nodes WarmStandby connections configurations.
 void setNodes(WSConfig... nodes)
          Sets or resets actual cluster nodes WarmStandby connections configurations.
 void setNodesEndpoints(Endpoint... endpoints)
          Sets or resets actual cluster nodes Endpoint's list.
 void setNodesEndpoints(java.lang.Iterable<Endpoint> endpoints)
          Sets or resets actual cluster nodes Endpoint's list.
protected  void setNodesImpl(java.lang.Iterable<WSConfig> nodes)
           
protected  void setState(ChannelState newState, java.lang.Throwable cause)
           
 void setTimeout(long timeout)
          Sets default timeout for synchronous operations on channel.
protected  void validateEndpoints(java.lang.Iterable<Endpoint> endpoints)
           
protected  void validateWSConfigs(java.lang.Iterable<WSConfig> nodes)
           
 
Methods inherited from class com.genesyslab.platform.clusterprotocol.AbstractClusterChannel
addChannelListener, addListener, clearInput, close, fireClosedEvent, fireClosedInternalChannelEvent, fireErrorEvent, fireErrorEvent, fireOnMessageRecv, fireOnMessageSend, fireOpenedEvent, fireOpenedInternalChannelEvent, getCopyResponse, getInputSize, getInterceptor, getTimeout, open, receive, receive, releaseReceivers, removeChannelListener, removeListener, resetReceiver, setCopyResponse, setInputSize, setMessageHandler, setReceiver, setupProtocolNode, throwNotClosed, throwNotOpened, throwNull, throwOnClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.InputChannel
setMessageHandler
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiver
receive, receive
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.Receiver
clearInput, getInputSize, releaseReceivers, setInputSize
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.OutputChannel
addListener, removeListener
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.RequestChannel
getCopyResponse, setCopyResponse
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.Channel
close, getTimeout, open
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ChannelListenerSupport
addChannelListener, removeChannelListener
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.InterceptorSupport
getInterceptor
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiverManagement
setReceiver
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ReceiverManagement
resetReceiver
 

Field Detail

protocolPolicy

protected final ClusterProtocolPolicy protocolPolicy

loadBalancer

protected final ClusterProtocolLoadBalancer loadBalancer
Constructor Detail

ClusterProtocolImpl

protected ClusterProtocolImpl(ProtocolBuilder<P,B> protocolBuilder,
                              ClusterProtocolPolicy protocolPolicy,
                              ClusterProtocolLoadBalancer loadBalancer)
Method Detail

policy

public ClusterProtocolPolicy policy()
Description copied from interface: ClusterProtocol
Returns reference to the actual cluster protocol policy.

Specified by:
policy in interface ClusterProtocol
Returns:
the cluster protocol policy reference.

getProtocolDescription

public ProtocolDescription getProtocolDescription()
Specified by:
getProtocolDescription in interface ProtocolDescriptionSupport

getProtocolId

public int getProtocolId()
Specified by:
getProtocolId in interface Protocol

getReferenceBuilder

public ReferenceBuilder getReferenceBuilder()
Specified by:
getReferenceBuilder in interface Protocol

setTimeout

public void setTimeout(long timeout)
Description copied from interface: Channel
Sets default timeout for synchronous operations on channel. Please see class description for timeout values meaning.

Specified by:
setTimeout in interface Channel
Overrides:
setTimeout in class AbstractClusterChannel<P extends ClientChannel>
Parameters:
timeout - timeout in milliseconds

validateEndpoints

protected void validateEndpoints(java.lang.Iterable<Endpoint> endpoints)

validateWSConfigs

protected void validateWSConfigs(java.lang.Iterable<WSConfig> nodes)

getState

public ChannelState getState()
Description copied from interface: AsyncChannel
Returns channel state. Note that the state returned is just a hint. It could change any time (e.g. just after this method returns).

Specified by:
getState in interface AsyncChannel
Returns:
State of the connection

openAsync

public <A> void openAsync(CompletionHandler<ChannelOpenedEvent,? super A> handler,
                          A attachment)
               throws ProtocolException
Description copied from interface: ClusterProtocol
Initiates connections to the initialized set of cluster nodes.
The completion handler will be notified by the first connection open event.

Specified by:
openAsync in interface ClusterProtocol
Parameters:
handler - the completion handler to be notified with the operation result.
attachment - user defined optional attachment for the handler.
Throws:
ProtocolException

open

public void open(long timeout)
          throws RegistrationException,
                 ProtocolException,
                 java.lang.IllegalStateException,
                 java.lang.InterruptedException
Initiates connections to the initialized set of cluster nodes.
Cluster Protocol will become Opened when at least one node is connected.

Specified by:
open in interface Channel
Parameters:
timeout - the timeout to wait for Opened state.
Throws:
java.lang.IllegalStateException - if protocol is not Closed, or it has no set nodes configurations or Endpoint's.
ProtocolTimeoutException - if cluster protocol got no notification about node connection in the given timeout frame. Note: it does not fail the open request, protocol is Opening and WarmStandby services continue to run re-connections.
RegistrationException - if there is an error related to registration procedure like server error about wrong client name, user password, etc
ProtocolException - if there is any problem related to the connection open
java.lang.InterruptedException
See Also:
Channel.open()

beginOpen

public void beginOpen()
               throws ProtocolException
Description copied from interface: AsyncChannel
Method is asynchronous. It will start connection sequence and return. Whether connection is established on return is not specified.

Specified by:
beginOpen in interface AsyncChannel
Throws:
ProtocolException - in case of problems establishing connection

close

public void close(long timeout)
           throws ProtocolException,
                  java.lang.IllegalStateException,
                  java.lang.InterruptedException
Description copied from interface: Channel
Closes channel synchronously with given timeout.

Specified by:
close in interface Channel
Throws:
ProtocolException - if there is any problem related to the connection close
java.lang.IllegalStateException - exception will not be thrown in current implementation.
java.lang.InterruptedException - in case the close operation was interrupted.

beginClose

public void beginClose()
Description copied from interface: AsyncChannel
Method is asynchronous. It will start disconnection and return. Whether connection is closed on return is not specified.

Specified by:
beginClose in interface AsyncChannel

closeAsync

public <A> void closeAsync(CompletionHandler<ChannelClosedEvent,? super A> handler,
                           A attachment)
Description copied from interface: ClusterProtocol
Initiates connections close to all of the cluster nodes.
Provided Completion Handler will be notified when all cluster nodes connections got closed.

Specified by:
closeAsync in interface ClusterProtocol
Parameters:
handler - the completion handler to be notified with the operation result.
attachment - user defined optional attachment for the handler.

createProtocol

protected P createProtocol()
Specified by:
createProtocol in class AbstractClusterChannel<P extends ClientChannel>

createProtocolNode

protected com.genesyslab.platform.clusterprotocol.ProtocolNodeRec createProtocolNode(WSConfig wsConfig)

setState

protected void setState(ChannelState newState,
                        java.lang.Throwable cause)

chooseProtocol

protected Protocol chooseProtocol(Message request)

getNextAvailableProtocol

public Protocol getNextAvailableProtocol()
Description copied from interface: ClusterProtocol
Returns reference to some opened instance of protocol in the cluster nodes pool in accordance to the LB strategy.

Specified by:
getNextAvailableProtocol in interface ClusterProtocol
Returns:
reference to a protocol instance wrapper.
See Also:
ClusterProtocolLoadBalancer

getNextAvailableProtocol

public Protocol getNextAvailableProtocol(Message message)
Description copied from interface: ClusterProtocol
Returns reference to some opened instance of protocol in the cluster nodes pool in accordance to the LB strategy for handling of the given request message.

Specified by:
getNextAvailableProtocol in interface ClusterProtocol
Parameters:
message - the protocol message.
Returns:
reference to a protocol instance wrapper.
See Also:
ClusterProtocolLoadBalancer, ClusterProtocolLoadBalancer.chooseNode(Message)

getOpenedNodesProtocols

public java.util.List<Protocol> getOpenedNodesProtocols()
Description copied from interface: ClusterProtocol
Returns snapshot list of cluster protocol nodes, which are tracked as Opened at the moment.

Specified by:
getOpenedNodesProtocols in interface ClusterProtocol
Returns:
list with cluster nodes protocols.

getAllNodesProtocols

public java.util.List<Protocol> getAllNodesProtocols()
Description copied from interface: ClusterProtocol
Returns snapshot list of all cluster protocol nodes.

Specified by:
getAllNodesProtocols in interface ClusterProtocol
Returns:
list with cluster nodes protocols.

getNodeProtocol

public Protocol getNodeProtocol(java.lang.String nodeName)
Description copied from interface: ClusterProtocol
Returns cluster protocol node instance by name of configured Endpoint or WSConfig.

Specified by:
getNodeProtocol in interface ClusterProtocol
Parameters:
nodeName - name of configured Endpoint or WSConfig.
Returns:
the cluster protocol node, or null.

getNodeProtocol

public Protocol getNodeProtocol(int protocolId)
Description copied from interface: ClusterProtocol
Returns cluster protocol node instance by PSDK Protocol Id.
It may be useful in cases, when it is required to get particular server connection by ProtocolId of specific response, or unsolicited event message.

Specified by:
getNodeProtocol in interface ClusterProtocol
Parameters:
protocolId - the protocol id.
Returns:
the cluster protocol node with the given id, or null.

send

public void send(Message message)
          throws ProtocolException
Description copied from interface: OutputChannel
Sends message to remote party. This method is usually asynchronous, so not every problem that occurs during send operation is thrown as exception. Detected problem may lead to error handler execution or even connection termination.

Specified by:
send in interface OutputChannel
Parameters:
message - Message to send
Throws:
ProtocolException - if there is some problems with message structure

request

public Message request(Message message)
                throws ProtocolException,
                       java.lang.IllegalStateException
Description copied from interface: RequestChannel
Sends the message and waitResponse for response. Time to waitResponse is set by "timeout" property. Only referenceable messages can be awaited, so if message doesn't support referencing there will be no waiting and null will be returned.

Specified by:
request in interface RequestChannel
Parameters:
message - Message to send
Returns:
Response message or null if no response implied
Throws:
ProtocolException - if some protocol problems occurred
java.lang.IllegalStateException - if channel is not in an appropriate state (e.g. closed)
See Also:
RequestChannel.request(Message, long)

request

public Message request(Message message,
                       long timeout)
                throws ProtocolException,
                       java.lang.IllegalStateException
Description copied from interface: RequestChannel
Sends the message and waitResponse for response or while specified timeout is elapsed. Only referenceable messages can be awaited, so if message doesn't support referencing there will be no waiting and null will be returned.

Specified by:
request in interface RequestChannel
Parameters:
message - Message to send
timeout - timeout in ms
Returns:
Response message or null if no response implied
Throws:
ProtocolException - if some protocol problems occurred
java.lang.IllegalStateException - if channel is not in an appropriate state (e.g. closed)

beginRequest

public RequestFuture beginRequest(Message message)
                           throws ProtocolException,
                                  java.lang.IllegalStateException
Description copied from interface: RequestChannel
Starts request and exits. To waitResponse for request result you can use either returned RequestFuture or RequestChannel.endRequest(RequestFuture) method.

Specified by:
beginRequest in interface RequestChannel
Parameters:
message - message to request with
Returns:
future object which allow to get result of the request
Throws:
ProtocolException - if sending of the request fails
java.lang.IllegalStateException - if channel is in inappropriate state to execute the request
See Also:
Channel.setTimeout(long), RequestChannel.requestAsync(Message, Object, CompletionHandler), RequestChannel.endRequest(RequestFuture)

beginRequest

public RequestFuture beginRequest(Message message,
                                  long timeout)
                           throws ProtocolException,
                                  java.lang.IllegalStateException
Throws:
ProtocolException
java.lang.IllegalStateException

requestAsync

public <A> void requestAsync(Message message,
                             A attachment,
                             CompletionHandler<Message,? super A> handler)
                  throws ProtocolException,
                         java.lang.IllegalStateException
Description copied from interface: RequestChannel
Starts request and exits. Server response, cancellation or timeout notification will be delivered to the specified callback.

Specified by:
requestAsync in interface RequestChannel
Type Parameters:
A - user callback attachment parameter type
Parameters:
message - message to request with
attachment - user defined parameter for the "callback"
handler - user defined "callback" interface for notification about server response
Throws:
ProtocolException - if sending of the request fails
java.lang.IllegalStateException - if channel is in inappropriate state to execute the request
See Also:
Channel.setTimeout(long), RequestChannel.requestAsync(Message, Object, CompletionHandler, long)

requestAsync

public <A> void requestAsync(Message message,
                             A attachment,
                             CompletionHandler<Message,? super A> handler,
                             long timeout)
                  throws ProtocolException,
                         java.lang.IllegalStateException
Description copied from interface: RequestChannel
Starts request and exits. Server response, cancellation or timeout notification will be delivered to the specified callback. Usage example:
   Message    request = ...;
   ReqContext ctx     = ...;

   CompletionHandler<Message, ReqContext> rqCallback =
           new CompletionHandler<Message, ReqContext>() {
               public void completed(
                       final Message response,
                       final ReqContext ctx) {
                   // handle the response
               }
               public void failed(
                       final Throwable throwable,
                       final ReqContext ctx) {
                   // handle the request failure
               }
           };

   protocol.requestAsync(request, ctx, rqCallback, timeout);
 

Specified by:
requestAsync in interface RequestChannel
Type Parameters:
A - user callback attachment parameter type
Parameters:
message - message to request with
attachment - user defined parameter for the "callback"
handler - user defined "callback" interface for notification about server response
timeout - timeout waiting for server response before request invalidation
Throws:
ProtocolException - if sending of the request fails
java.lang.IllegalStateException - if channel is in inappropriate state to execute the request

endRequest

public Message endRequest(RequestFuture future)
                   throws ProtocolException
Description copied from interface: RequestChannel
Tries to finish request started with beginRequest().

Specified by:
endRequest in interface RequestChannel
Parameters:
future - future object obtained from beginRequest()
Returns:
message if request is successful or null if there were no response
Throws:
ProtocolException - if there are protocol related problems
See Also:
RequestChannel.beginRequest(Message)

endRequest

public Message endRequest(RequestFuture future,
                          long timeout)
                   throws ProtocolException
Description copied from interface: RequestChannel
Tries to finish request started with beginRequest().

Specified by:
endRequest in interface RequestChannel
Parameters:
future - future object obtained from beginRequest()
timeout - timeout to waitResponse for response
Returns:
message if request is successful or null if there were no response
Throws:
ProtocolException - if there are protocol related problems
See Also:
RequestChannel.beginRequest(Message)

onChannelOpened

protected void onChannelOpened(com.genesyslab.platform.clusterprotocol.ProtocolNodeRec protocolItem,
                               WSOpenedEvent event)
Specified by:
onChannelOpened in class AbstractClusterChannel<P extends ClientChannel>

onChannelDisconnected

protected void onChannelDisconnected(com.genesyslab.platform.clusterprotocol.ProtocolNodeRec protocolItem,
                                     WSDisconnectedEvent event)
Specified by:
onChannelDisconnected in class AbstractClusterChannel<P extends ClientChannel>

onChannelFailure

protected void onChannelFailure(com.genesyslab.platform.clusterprotocol.ProtocolNodeRec protocolItem,
                                WSTriedUnsuccessfullyEvent event)
Specified by:
onChannelFailure in class AbstractClusterChannel<P extends ClientChannel>

getEndpoint

public Endpoint getEndpoint()
Specified by:
getEndpoint in interface EndpointSupport

setEndpoint

public void setEndpoint(Endpoint endpoint)
Specified by:
setEndpoint in interface EndpointSupport

getConfiguration

public ConnectionConfiguration getConfiguration()
Specified by:
getConfiguration in interface ConfigurationSupport

configure

public void configure(ConnectionConfiguration config)
Specified by:
configure in interface ConfigurationSupport

setNodesEndpoints

public void setNodesEndpoints(Endpoint... endpoints)
Description copied from interface: ClusterProtocol
Sets or resets actual cluster nodes Endpoint's list.

Specified by:
setNodesEndpoints in interface ClusterProtocol
Parameters:
endpoints - list of cluster nodes Endpoint's.

setNodesEndpoints

public void setNodesEndpoints(java.lang.Iterable<Endpoint> endpoints)
Description copied from interface: ClusterProtocol
Sets or resets actual cluster nodes Endpoint's list.

Specified by:
setNodesEndpoints in interface ClusterProtocol
Parameters:
endpoints - collection of cluster nodes Endpoint's.

setNodes

public void setNodes(WSConfig... nodes)
Description copied from interface: ClusterProtocol
Sets or resets actual cluster nodes WarmStandby connections configurations.

Specified by:
setNodes in interface ClusterProtocol
Parameters:
nodes - list of cluster nodes configuration.

setNodes

public void setNodes(java.lang.Iterable<WSConfig> nodes)
Description copied from interface: ClusterProtocol
Sets or resets actual cluster nodes WarmStandby connections configurations.

Specified by:
setNodes in interface ClusterProtocol
Parameters:
nodes - collection of cluster nodes configuration.

setNodesImpl

protected void setNodesImpl(java.lang.Iterable<WSConfig> nodes)

addNodesEndpoints

public void addNodesEndpoints(Endpoint... endpoints)
Description copied from interface: ClusterProtocol
Adds Endpoint's list as additional cluster protocol nodes.

Specified by:
addNodesEndpoints in interface ClusterProtocol
Parameters:
endpoints - list of cluster nodes Endpoint's.

addNodesEndpoints

public void addNodesEndpoints(java.lang.Iterable<Endpoint> endpoints)
Description copied from interface: ClusterProtocol
Adds Endpoint's collection as additional cluster protocol nodes.

Specified by:
addNodesEndpoints in interface ClusterProtocol
Parameters:
endpoints - collection of cluster nodes Endpoint's.

addNodes

public void addNodes(WSConfig... nodes)
Description copied from interface: ClusterProtocol
Adds list of WarmStandby configurations as additional cluster protocol nodes.

Specified by:
addNodes in interface ClusterProtocol
Parameters:
nodes - list of cluster nodes configuration.

addNodes

public void addNodes(java.lang.Iterable<WSConfig> nodes)
Description copied from interface: ClusterProtocol
Adds collection of WarmStandby configurations as additional cluster protocol nodes.

Specified by:
addNodes in interface ClusterProtocol
Parameters:
nodes - connection of cluster nodes configurations.

addNodesImpl

protected void addNodesImpl(java.lang.Iterable<WSConfig> nodes)

removeNodes

public void removeNodes(java.lang.String... names)
Description copied from interface: ClusterProtocol
Removes cluster protocol node(s) by given nodes names.

Specified by:
removeNodes in interface ClusterProtocol
Parameters:
names - list of Endpoint's/WSConfig's names.

removeNodes

public void removeNodes(java.lang.Iterable<java.lang.String> names)
Description copied from interface: ClusterProtocol
Removes cluster protocol node(s) by given nodes names.

Specified by:
removeNodes in interface ClusterProtocol
Parameters:
names - collection of Endpoint's/WSConfig's names.

getNodesConfig

public java.util.List<WSConfig> getNodesConfig()
Description copied from interface: ClusterProtocol
Returns list of cluster nodes connections configurations.

Specified by:
getNodesConfig in interface ClusterProtocol
Returns:
list of cluster protocol nodes connections configurations.

setInvoker

@Deprecated
public void setInvoker(AsyncInvoker invoker)
Deprecated. 

This method does nothing.
Cluster protocol does not provide internal invoker customization.

Specified by:
setInvoker in interface AsyncInvokerSupport

setConnectionInvoker

@Deprecated
public void setConnectionInvoker(AsyncInvoker connectionInvoker)
Deprecated. 

This method does nothing.
Cluster protocol does not use connection invoker.

Specified by:
setConnectionInvoker in interface ConnectionInvokerSupport

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.