com.googlecode.mobilityrpc.network.impl.tcp
Class TCPConnectionListener
java.lang.Object
com.googlecode.mobilityrpc.network.impl.tcp.TCPConnectionListener
- All Implemented Interfaces:
- Destroyable, Initializable, Managed, ConnectionListener, ConnectionListenerInternal
public class TCPConnectionListener
- extends Object
- implements ConnectionListenerInternal
An implementation of ConnectionListener which uses a TCP ServerSocket.
This implementation provides defaults for most parameters, see documentation on setter methods.
- Author:
- Niall Gallagher
|
Method Summary |
void |
destroy()
Destroys (closes/shuts down) the resource(s) managed by the object, closing connections, stopping threads etc. |
ConnectionId |
getConnectionId()
|
void |
init()
Initializes the resource(s) managed by the object, opening connections, starting threads etc. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TCPConnectionListener
public TCPConnectionListener(ConnectionId localEndpointIdentifier,
IncomingMessageHandler incomingMessageHandler,
ConnectionStateListener connectionStateListener)
- Parameters:
localEndpointIdentifier - An object which contains parameters for the listener which will be usedincomingMessageHandler - An object to which message received should be passedconnectionStateListener - an object which should be notified if the connection is closed
init
public void init()
- Description copied from interface:
Initializable
- Initializes the resource(s) managed by the object, opening connections, starting threads etc. as necessary.
- Specified by:
init in interface Initializable
destroy
public void destroy()
- Description copied from interface:
Destroyable
- Destroys (closes/shuts down) the resource(s) managed by the object, closing connections, stopping threads etc.
as necessary.
- Specified by:
destroy in interface Destroyable
getConnectionId
public ConnectionId getConnectionId()
- Specified by:
getConnectionId in interface ConnectionListener
Copyright © 2016. All rights reserved.