Permalink
Browse files

Renamed shutdown() to destroy()

  • Loading branch information...
1 parent da260f6 commit 88fa33934c4d86e955f9612641d8732d6ad66fec @jjlauer jjlauer committed May 6, 2011
View
22 ReleaseNotes.txt
@@ -7,15 +7,23 @@ SMPP Library
* Upgraded ch-commons-util dependency from 4.1 to 5.0
* WARN: There are some minor source and binary backwards compatability issues
that were unavoidable to add request expiry as a new feature.
- * Automatic request expiration is no longer experimental. See the new
+ * Automatic request expiration is fully supported. See the new
constructors for both DefaultSmppClient and DefaultSmppServer that include
a "monitorExecutor" parameter to enable the feature. Also, there are new
- defaultXXXXXX settings for an SmppServerConfiguration that will control
+ several new options for an SmppServerConfiguration that will control
the default settings for each server session (including enable monitoring).
+ defaultWindowSize
+ defaultWindowMonitorInterval
+ defaultWindowWaitTimeout
+ defaultRequestExpiryTimeout
+ maxConnectionSize
* Added support for counters in both sessions and server for tracking
various key metrics. Counters are enabled on an SmppServer by default, but
- must be explicitly enabled on sessions.
- * Added initial support for JMX management
+ must be explicitly enabled on sessions. See countersEnableD() option.
+ * Added initial support for JMX management by including an SmppServerMXBean
+ and an SmppSessionMXBean. Servers can automatically have themselves and
+ their sessions registered & unregistered, but clients will need to use
+ explictly register/unregister.
* Added 2 new time measurements on asynchronous responses (window wait time,
and response time).
* Modified internals of SmppSession to call the "requestWindow"
@@ -43,9 +51,9 @@ SMPP Library
The maximum number of expected concurrent sessions is recommended to be set
in the SmppServerConfiguration object. The new default is 100 max sessions.
* Added several other configuration options for an SmppServer:
- maxConnections - max number of concurrent connections/sessions (default 100)
- reuseAddress - whether to reuse the server socket (default is true)
- nonBlockingSocketsEnabled - whether to use NIO (non blocking) or OIO
+ maxConnections - max number of concurrent connections/sessions (default 100)
+ reuseAddress - whether to reuse the server socket (default is true)
+ nonBlockingSocketsEnabled - whether to use NIO (non blocking) or OIO
(old blocking) type server sockets. (default is true)
* Added an example of a "SlowSmppServer" to test what happens if an SMSC is
slow acknowledging submits.
View
4 src/main/java/com/cloudhopper/smpp/SmppSession.java
@@ -210,14 +210,14 @@
public void unbind(long timeoutInMillis);
/**
- * Shutdown a session by ensuring the socket is closed and all
+ * Destroy a session by ensuring the socket is closed and all
* resources are cleaned up. This method should the <b>last</b> method called
* before discarding or losing a reference to a session. Since this method
* cleans up all resources, make sure that any data you need to access is
* accessed <b>before</b> calling this method. After calling this method
* it is not guaranteed that <b>any</b> other method will correctly work.
*/
- public void shutdown();
+ public void destroy();
/**
* Synchronously sends an "enquire_link" request to the remote endpoint and
View
2 src/main/java/com/cloudhopper/smpp/impl/DefaultSmppSession.java
@@ -414,7 +414,7 @@ public void close(long timeoutInMillis) {
}
@Override
- public void shutdown() {
+ public void destroy() {
close();
this.sendWindow.destroy();
if (this.counters != null) {
View
2 src/main/java/com/cloudhopper/smpp/jmx/DefaultSmppSessionMXBean.java
@@ -56,7 +56,7 @@
public void close(long timeoutInMillis);
- public void shutdown();
+ public void destroy();
public void unbind(long timeoutInMillis);
View
2 src/test/java/com/cloudhopper/smpp/demo/ClientMain.java
@@ -173,7 +173,7 @@ public Thread newThread(Runnable r) {
logger.info("rx-dataSM: {}", session0.getCounters().getRxDataSM());
}
- session0.shutdown();
+ session0.destroy();
// alternatively, could call close(), get outstanding requests from
// the sendWindow (if we wanted to retry them later), then call shutdown()
}
View
2 src/test/java/com/cloudhopper/smpp/demo/ServerMain.java
@@ -123,7 +123,7 @@ public void sessionDestroyed(Long sessionId, SmppServerSession session) {
}
// make sure it's really shutdown
- session.shutdown();
+ session.destroy();
}
}
View
2 src/test/java/com/cloudhopper/smpp/impl/DefaultSmppSessionTest.java
@@ -1011,7 +1011,7 @@ public void shutdown() throws Exception {
Assert.assertEquals(1, session.getSendWindow().getSize());
// make sure that a shutdown request performs all expected cleanup
- session.shutdown();
+ session.destroy();
Assert.assertEquals(0, session.getSendWindow().getSize());
}

0 comments on commit 88fa339

Please sign in to comment.