com.opera.core.systems.scope.stp
Class StpConnectionListener
java.lang.Object
com.opera.core.systems.scope.stp.StpConnectionListener
- All Implemented Interfaces:
- SocketListener
public class StpConnectionListener
- extends Object
- implements SocketListener
This class handles accepting STP connections. STP connections are accepted in the SocketListener.canRead(java.nio.channels.SelectableChannel) method, which then spawns an StpConnection.
- Author:
- Jan Vidar Krey
StpConnectionListener
public StpConnectionListener(int port,
IConnectionHandler handler,
EventHandler eventHandler,
boolean manualConnect,
SocketMonitor monitor)
throws IOException
- Throws:
IOException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
stop
public void stop()
- Shuts down and cleans up the STP connection to Opera.
start
public void start()
throws IOException
- Starts the STP connection listener.
- Throws:
IOException - if unable to bind to address
canRead
public boolean canRead(SelectableChannel channel)
throws IOException
- Specified by:
canRead in interface SocketListener
- Returns:
- true if more reading is expected.
- Throws:
IOException
canWrite
public boolean canWrite(SelectableChannel ch)
throws IOException
- Specified by:
canWrite in interface SocketListener
- Returns:
- true if more writing is needed.
- Throws:
IOException
Copyright © 2012. All Rights Reserved.