public class DefaultSmppServer extends Object implements SmppServer, DefaultSmppServerMXBean
| Constructor and Description |
|---|
DefaultSmppServer(SmppServerConfiguration configuration,
SmppServerHandler serverHandler)
Creates a new default SmppServer.
|
DefaultSmppServer(SmppServerConfiguration configuration,
SmppServerHandler serverHandler,
ExecutorService executor)
Creates a new default SmppServer.
|
DefaultSmppServer(SmppServerConfiguration configuration,
SmppServerHandler serverHandler,
ExecutorService executor,
ScheduledExecutorService monitorExecutor)
Creates a new default SmppServer.
|
| Modifier and Type | Method and Description |
|---|---|
protected byte |
autoNegotiateInterfaceVersion(byte requestedInterfaceVersion) |
protected void |
bindRequested(Long sessionId,
SmppSessionConfiguration config,
BaseBind bindRequest) |
protected BaseBindResp |
createBindResponse(BaseBind bindRequest,
int statusCode) |
protected void |
createSession(Long sessionId,
org.jboss.netty.channel.Channel channel,
SmppSessionConfiguration config,
BaseBindResp preparedBindResponse) |
void |
destroy()
Destroys the SMPP server.
|
protected void |
destroySession(Long sessionId,
DefaultSmppSession session) |
int |
getBindRequested() |
long |
getBindTimeout() |
int |
getBindTimeouts() |
Timer |
getBindTimer() |
int |
getChannelConnects() |
int |
getChannelDisconnects() |
org.jboss.netty.channel.group.ChannelGroup |
getChannels() |
SmppServerConfiguration |
getConfiguration() |
int |
getConnectionSize() |
DefaultSmppServerCounters |
getCounters() |
int |
getMaxConnectionSize() |
int |
getReceiverSessionSize() |
int |
getSessionCreated() |
int |
getSessionDestroyed() |
int |
getSessionSize() |
int |
getTransceiverSessionSize() |
PduTranscoder |
getTranscoder() |
int |
getTransmitterSessionSize() |
boolean |
isDestroyed()
Returns true if the SMPP server is destroyed.
|
boolean |
isNonBlockingSocketsEnabled() |
boolean |
isReuseAddress() |
boolean |
isStarted()
Returns true if the SMPP server is started.
|
boolean |
isStopped()
Returns true if the SMPP server is stopped.
|
protected Long |
nextSessionId() |
void |
resetCounters() |
void |
start()
Starts the SMPP server.
|
void |
stop()
Stops the SMPP server.
|
public DefaultSmppServer(SmppServerConfiguration configuration, SmppServerHandler serverHandler)
configuration - The server configuration to create this server withserverHandler - The handler implementation for handling bind requests
and creating/destroying sessions.public DefaultSmppServer(SmppServerConfiguration configuration, SmppServerHandler serverHandler, ExecutorService executor)
configuration - The server configuration to create this server withserverHandler - The handler implementation for handling bind requests
and creating/destroying sessions.executor - The executor that IO workers will be executed with. An
Executors.newCachedDaemonThreadPool() is recommended. The max threads
will never grow more than configuration.getMaxConnections() if NIO
sockets are used.public DefaultSmppServer(SmppServerConfiguration configuration, SmppServerHandler serverHandler, ExecutorService executor, ScheduledExecutorService monitorExecutor)
configuration - The server configuration to create this server withserverHandler - The handler implementation for handling bind requests
and creating/destroying sessions.executor - The executor that IO workers will be executed with. An
Executors.newCachedDaemonThreadPool() is recommended. The max threads
will never grow more than configuration.getMaxConnections() if NIO
sockets are used.monitorExecutor - The scheduled executor that all sessions will share
to monitor themselves and expire requests. If null monitoring will
be disabled.public PduTranscoder getTranscoder()
public org.jboss.netty.channel.group.ChannelGroup getChannels()
getChannels in interface SmppServerpublic SmppServerConfiguration getConfiguration()
public DefaultSmppServerCounters getCounters()
getCounters in interface SmppServerpublic Timer getBindTimer()
public boolean isStarted()
SmppServerisStarted in interface DefaultSmppServerMXBeanisStarted in interface SmppServerpublic boolean isStopped()
SmppServerisStopped in interface DefaultSmppServerMXBeanisStopped in interface SmppServerpublic boolean isDestroyed()
SmppServerisDestroyed in interface DefaultSmppServerMXBeanisDestroyed in interface SmppServerpublic void start()
throws SmppChannelException
SmppServerstart in interface DefaultSmppServerMXBeanstart in interface SmppServerSmppChannelExceptionpublic void stop()
SmppServer#shutdown()stop in interface DefaultSmppServerMXBeanstop in interface SmppServerpublic void destroy()
SmppServerdestroy in interface DefaultSmppServerMXBeandestroy in interface SmppServerprotected Long nextSessionId()
protected byte autoNegotiateInterfaceVersion(byte requestedInterfaceVersion)
protected BaseBindResp createBindResponse(BaseBind bindRequest, int statusCode)
protected void bindRequested(Long sessionId, SmppSessionConfiguration config, BaseBind bindRequest) throws SmppProcessingException
SmppProcessingExceptionprotected void createSession(Long sessionId, org.jboss.netty.channel.Channel channel, SmppSessionConfiguration config, BaseBindResp preparedBindResponse) throws SmppProcessingException
SmppProcessingExceptionprotected void destroySession(Long sessionId, DefaultSmppSession session)
public void resetCounters()
resetCounters in interface DefaultSmppServerMXBeanpublic int getSessionSize()
getSessionSize in interface DefaultSmppServerMXBeanpublic int getTransceiverSessionSize()
getTransceiverSessionSize in interface DefaultSmppServerMXBeanpublic int getTransmitterSessionSize()
getTransmitterSessionSize in interface DefaultSmppServerMXBeanpublic int getReceiverSessionSize()
getReceiverSessionSize in interface DefaultSmppServerMXBeanpublic int getMaxConnectionSize()
getMaxConnectionSize in interface DefaultSmppServerMXBeanpublic int getConnectionSize()
getConnectionSize in interface DefaultSmppServerMXBeanpublic long getBindTimeout()
getBindTimeout in interface DefaultSmppServerMXBeanpublic boolean isNonBlockingSocketsEnabled()
isNonBlockingSocketsEnabled in interface DefaultSmppServerMXBeanpublic boolean isReuseAddress()
isReuseAddress in interface DefaultSmppServerMXBeanpublic int getChannelConnects()
getChannelConnects in interface DefaultSmppServerMXBeanpublic int getChannelDisconnects()
getChannelDisconnects in interface DefaultSmppServerMXBeanpublic int getBindTimeouts()
getBindTimeouts in interface DefaultSmppServerMXBeanpublic int getBindRequested()
getBindRequested in interface DefaultSmppServerMXBeanpublic int getSessionCreated()
getSessionCreated in interface DefaultSmppServerMXBeanpublic int getSessionDestroyed()
getSessionDestroyed in interface DefaultSmppServerMXBeanCopyright © 2009-2014 Cloudhopper by Twitter. All Rights Reserved.