public interface Management
Management class manages the underlying Association and
Server.
Management should persist the state of Server and Association
Management when started looks for file XXX_sctp.xml containing serialized state of underlying
Association and Server. Set the directory path by calling setPersistDir(String) to direct Management to look at specified
directory for underlying serialized file.
If directory path is not set, Management searches for system property sctp.persist.dir to get the path for directory
Even if sctp.persist.dir system property is not set, Management will look at System set property user.dir
| Modifier and Type | Method and Description |
|---|---|
Association |
addAssociation(String hostAddress,
int hostPort,
String peerAddress,
int peerPort,
String assocName)
Add Association.
|
Association |
addAssociation(String hostAddress,
int hostPort,
String peerAddress,
int peerPort,
String assocName,
IpChannelType ipChannelType,
String[] extraHostAddresses)
Add Association
|
void |
addCongestionListener(CongestionListener listener)
Adding CongestionListener.
|
void |
addManagementEventListener(ManagementEventListener listener)
Adding ManagementEventListener.
|
Server |
addServer(String serverName,
String hostAddress,
int port)
Add new
Server. |
Server |
addServer(String serverName,
String hostAddress,
int port,
IpChannelType ipChannelType,
boolean acceptAnonymousConnections,
int maxConcurrentConnectionsCount,
String[] extraHostAddresses)
Add new
Server. |
Server |
addServer(String serverName,
String hostAddress,
int port,
IpChannelType ipChannelType,
String[] extraHostAddresses)
Add new
Server. |
Association |
addServerAssociation(String peerAddress,
int peerPort,
String serverName,
String assocName)
Add server Association.
|
Association |
addServerAssociation(String peerAddress,
int peerPort,
String serverName,
String assocName,
IpChannelType ipChannelType)
Add server Association.
|
Association |
getAssociation(String assocName)
Get existing Association for passed name
|
Map<String,Association> |
getAssociations()
Get configured Association map with name as key and Association instance
as value
|
int |
getBufferSize()
Get a sending / receiving buffer size per an association (in bytes).
|
double |
getCongControl_BackToNormalDelayThreshold_1()
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
double |
getCongControl_BackToNormalDelayThreshold_2()
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
double |
getCongControl_BackToNormalDelayThreshold_3()
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
double |
getCongControl_DelayThreshold_1()
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
double |
getCongControl_DelayThreshold_2()
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
double |
getCongControl_DelayThreshold_3()
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
int |
getConnectDelay()
Get connection delay.
|
String |
getName()
Returns the name of this
Management instance |
Boolean |
getOptionSctpDisableFragments()
SCTP option: Enables or disables message fragmentation.
|
Integer |
getOptionSctpFragmentInterleave()
SCTP option: Fragmented interleave controls how the presentation of messages occur for the message receiver.
|
Integer |
getOptionSctpInitMaxstreams_MaxInStreams()
SCTP option: The maximum number of streams requested by the local endpoint during association initialization
For an SctpServerChannel this option determines the maximum number of inbound streams
accepted sockets will negotiate with their connecting peer.
|
Integer |
getOptionSctpInitMaxstreams_MaxOutStreams()
SCTP option: The maximum number of streams requested by the local endpoint during association initialization
For an SctpServerChannel this option determines the maximum number of outbound streams
accepted sockets will negotiate with their connecting peer.
|
Boolean |
getOptionSctpNodelay()
SCTP option: Enables or disables a Nagle-like algorithm.
|
Integer |
getOptionSoLinger()
SCTP option: Linger on close if data is present.
|
Integer |
getOptionSoRcvbuf()
SCTP option: The size of the socket receive buffer.
|
Integer |
getOptionSoSndbuf()
SCTP option: The size of the socket send buffer.
|
String |
getPersistDir()
Get persist dir
|
ServerListener |
getServerListener()
The AssociationListener set for this Association
|
List<Server> |
getServers()
Get the list of Servers configured
|
int |
getWorkerThreads()
This method is not used more.
|
boolean |
isSingleThread()
This method is not used more.
|
boolean |
isStarted()
returns true if Management is started
|
void |
removeAllResourses()
This method stops and removes all registered servers and associations
Management should be started
Use this method only for test purposes or after total crashes
|
void |
removeAssociation(String assocName)
Remove existing Association.
|
void |
removeCongestionListener(CongestionListener listener)
Removing CongestionListener.
|
void |
removeManagementEventListener(ManagementEventListener listener)
Removing ManagementEventListener.
|
void |
removeServer(String serverName)
Remove existing
Server |
void |
setBufferSize(int bufferSize)
Set a sending / receiving buffer size per an association (in bytes).
|
void |
setCongControl_BackToNormalDelayThreshold_1(double val)
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
void |
setCongControl_BackToNormalDelayThreshold_2(double val)
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
void |
setCongControl_BackToNormalDelayThreshold_3(double val)
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
void |
setCongControl_DelayThreshold_1(double val)
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
void |
setCongControl_DelayThreshold_2(double val)
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
void |
setCongControl_DelayThreshold_3(double val)
For outgoing messages congestion control we need to have 3 thresholds - delays of outgoing messages before it will be
sent to IP channel (3 levels - 1, 2, 3).
|
void |
setConnectDelay(int connectDelay)
Set the connection delay for client side
Association |
void |
setOptionSctpDisableFragments(Boolean optionSctpDisableFragments)
SCTP option: Enables or disables message fragmentation.
|
void |
setOptionSctpFragmentInterleave(Integer optionSctpFragmentInterleave)
SCTP option: Fragmented interleave controls how the presentation of messages occur for the message receiver.
|
void |
setOptionSctpInitMaxstreams_MaxInStreams(Integer maxInStreams)
SCTP option: The maximum number of streams requested by the local endpoint during association initialization
For an SctpServerChannel this option determines the maximum number of inbound streams
accepted sockets will negotiate with their connecting peer.
|
void |
setOptionSctpInitMaxstreams_MaxOutStreams(Integer maxOutStreams)
SCTP option: The maximum number of streams requested by the local endpoint during association initialization
For an SctpServerChannel this option determines the maximum number of outbound streams
accepted sockets will negotiate with their connecting peer.
|
void |
setOptionSctpNodelay(Boolean optionSctpNodelay)
SCTP option: Enables or disables a Nagle-like algorithm.
|
void |
setOptionSoLinger(Integer optionSoLinger)
SCTP option: Linger on close if data is present.
|
void |
setOptionSoRcvbuf(Integer optionSoRcvbuf)
SCTP option: The size of the socket receive buffer.
|
void |
setOptionSoSndbuf(Integer optionSoSndbuf)
SCTP option: The size of the socket send buffer.
|
void |
setPersistDir(String persistDir)
Directory where the XXX.xml will be searched
|
void |
setServerListener(ServerListener serverListener)
The
AssociationListener to be registered for this Association |
void |
setSingleThread(boolean singleThread)
This method is not used more.
|
void |
setWorkerThreads(int workerThreads)
This method is not used more.
|
void |
start()
Start the management.
|
void |
startAssociation(String assocName)
Start the existing Association
|
void |
startServer(String serverName)
Start the existing Server
|
void |
stop()
Stop the management.
|
void |
stopAssociation(String assocName)
Stop the existing Association
|
void |
stopServer(String serverName)
Stop the Server.
|
String getName()
Management instanceString getPersistDir()
void setPersistDir(String persistDir)
persistDir - ServerListener getServerListener()
void setServerListener(ServerListener serverListener)
AssociationListener to be registered for this AssociationassociationListener - void addManagementEventListener(ManagementEventListener listener)
listener - void removeManagementEventListener(ManagementEventListener listener)
listener - void addCongestionListener(CongestionListener listener)
listener - void removeCongestionListener(CongestionListener listener)
listener - void start()
throws Exception
Management is started. If Server and Association
were defined previously, Management should recreate those Server
and Association.Exceptionvoid stop()
throws Exception
Server and
Associtaion.Exceptionboolean isStarted()
void removeAllResourses()
throws Exception
ExceptionServer addServer(String serverName, String hostAddress, int port, IpChannelType ipChannelType, boolean acceptAnonymousConnections, int maxConcurrentConnectionsCount, String[] extraHostAddresses) throws Exception
Server.serverName - name of the Server. Should be unique namehostAddress - IP address that this server will bind toport - port that this server will bind toipChannelType - IP channel type: SCTP or TCPacceptAnonymousConnections - true: this Server accepts Anonymous connections, false: nomaxConcurrentConnectionsCount - A count of concurrent connections that can accept a Server. 0 means an unlimited count.extraHostAddresses - When SCTP multi-homing configuration extra IP addresses can be put here
If multi-homing absence this parameter can be nullException - Exception if management not started or server name already
taken or some other server already has same ip:portServer addServer(String serverName, String hostAddress, int port, IpChannelType ipChannelType, String[] extraHostAddresses) throws Exception
Server. Server can not accept anonymous connections.serverName - name of the Server. Should be unique namehostAddress - IP address that this server will bind toport - port that this server will bind toipChannelType - IP channel type: SCTP or TCPextraHostAddresses - When SCTP multi-homing configuration extra IP addresses can be put here
If multi-homing absence this parameter can be nullException - Exception if management not started or server name already
taken or some other server already has same ip:portServer addServer(String serverName, String hostAddress, int port) throws Exception
Server. IP channel type is SCTP. Server can not accept anonymous connections.serverName - name of the Server. Should be unique namehostAddress - IP address that this server will bind toport - port that this server will bind toException - Exception if management not started or server name already
taken or some other server already has same ip:portvoid removeServer(String serverName) throws Exception
ServerserverName - Exception - Exception if no Server with the passed name exist or Server
is started. Before removing server, it should be stoppedvoid startServer(String serverName) throws Exception
serverName - name of the Server to be startedException - Exception if no Server found for given name or Server already
startedvoid stopServer(String serverName) throws Exception
serverName - name of the Server to be stoppedException - Exception if no Server found for given name or any of the
Association within Server still started. All the
Association's must be stopped before stopping ServerAssociation addServerAssociation(String peerAddress, int peerPort, String serverName, String assocName) throws Exception
peerAddress - the peer IP address that this association will accept
connection frompeerPort - the peer port that this association will accept connection
fromserverName - the Server that this association belongs toassocName - unique name of AssociationExceptionAssociation addServerAssociation(String peerAddress, int peerPort, String serverName, String assocName, IpChannelType ipChannelType) throws Exception
peerAddress - the peer IP address that this association will accept
connection frompeerPort - the peer port that this association will accept connection
fromserverName - the Server that this association belongs toassocName - unique name of AssociationipChannelType - IP channel type: SCTP or TCPExceptionAssociation addAssociation(String hostAddress, int hostPort, String peerAddress, int peerPort, String assocName) throws Exception
hostAddress - hostPort - If hostPort==0 this mean the local port will be any vacant portpeerAddress - peerPort - assocName - ExceptionAssociation addAssociation(String hostAddress, int hostPort, String peerAddress, int peerPort, String assocName, IpChannelType ipChannelType, String[] extraHostAddresses) throws Exception
hostAddress - hostPort - If hostPort==0 this mean the local port will be any vacant portpeerAddress - peerPort - assocName - ipChannelType - IP channel type: SCTP or TCPextraHostAddresses - When SCTP multi-homing configuration extra IP addresses can be put here
If multi-homing absence this parameter can be nullExceptionvoid removeAssociation(String assocName) throws Exception
assocName - ExceptionAssociation getAssociation(String assocName) throws Exception
assocName - ExceptionMap<String,Association> getAssociations()
void startAssociation(String assocName) throws Exception
assocName - Exceptionvoid stopAssociation(String assocName) throws Exception
assocName - Exceptionint getConnectDelay()
Association dies due to
network failure or any other reason, it should attempt to reconnect after
connectDelay intervalvoid setConnectDelay(int connectDelay)
throws Exception
AssociationconnectDelay - Exceptionint getWorkerThreads()
void setWorkerThreads(int workerThreads)
throws Exception
workerThreads - Exceptionboolean isSingleThread()
void setSingleThread(boolean singleThread)
throws Exception
singleThread - Exceptiondouble getCongControl_DelayThreshold_1()
double getCongControl_DelayThreshold_2()
double getCongControl_DelayThreshold_3()
void setCongControl_DelayThreshold_1(double val)
throws Exception
val - Exceptionvoid setCongControl_DelayThreshold_2(double val)
throws Exception
val - Exceptionvoid setCongControl_DelayThreshold_3(double val)
throws Exception
val - Exceptiondouble getCongControl_BackToNormalDelayThreshold_1()
double getCongControl_BackToNormalDelayThreshold_2()
double getCongControl_BackToNormalDelayThreshold_3()
void setCongControl_BackToNormalDelayThreshold_1(double val)
throws Exception
val - Exceptionvoid setCongControl_BackToNormalDelayThreshold_2(double val)
throws Exception
val - Exceptionvoid setCongControl_BackToNormalDelayThreshold_3(double val)
throws Exception
val - ExceptionBoolean getOptionSctpDisableFragments()
void setOptionSctpDisableFragments(Boolean optionSctpDisableFragments)
optionSctpDisableFragments - Integer getOptionSctpFragmentInterleave()
void setOptionSctpFragmentInterleave(Integer optionSctpFragmentInterleave)
optionSctpFragmentInterleave - Integer getOptionSctpInitMaxstreams_MaxOutStreams()
Integer getOptionSctpInitMaxstreams_MaxInStreams()
void setOptionSctpInitMaxstreams_MaxOutStreams(Integer maxOutStreams)
void setOptionSctpInitMaxstreams_MaxInStreams(Integer maxInStreams)
Boolean getOptionSctpNodelay()
void setOptionSctpNodelay(Boolean optionSctpNodelay)
optionSctpNodelay - Integer getOptionSoSndbuf()
void setOptionSoSndbuf(Integer optionSoSndbuf)
optionSoSndbuf - Integer getOptionSoRcvbuf()
void setOptionSoRcvbuf(Integer optionSoRcvbuf)
optionSoRcvbuf - Integer getOptionSoLinger()
void setOptionSoLinger(Integer optionSoLinger)
optionSoLinger - int getBufferSize()
Copyright © 2017. All Rights Reserved.