|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Connection
A Connection
represents a logical connection over a shared
physical connection, managed by a ManagedConnection
Channel
,
ChannelHandler
,
ManagedConnection
Method Summary | |
---|---|
void |
accept(java.lang.String name,
ChannelHandler handler)
Register a handler to accept channel connections for the specified name. |
void |
accept(java.lang.String name,
ChannelListener listener)
Register a handler to accept a single channel connection for the specified name, and bind the listener to it This method returns immediately. |
void |
addConnectionEventListener(ConnectionEventListener listener)
Add a listener for connection events |
void |
close()
Close the connection |
void |
close(java.lang.String name)
Stop accepting requests on the specified channel |
Channel |
open(java.lang.String name)
Open a channel |
void |
removeConnectionEventListener(ConnectionEventListener listener)
Remove a listener of connection events |
Method Detail |
---|
Channel open(java.lang.String name) throws java.rmi.RemoteException
name
- the name of the channel
java.rmi.RemoteException
- if the channel can't be opened
InvalidChannelException
- if the channel doesn't existvoid accept(java.lang.String name, ChannelHandler handler) throws java.rmi.RemoteException
name
- the channel name to listen onhandler
- the handler to pass new channels to
java.rmi.RemoteException
- if an error occurs accepting channels
java.lang.IllegalArgumentException
- if any argument is nullvoid accept(java.lang.String name, ChannelListener listener) throws java.rmi.RemoteException
name
- the channel name to listen onlistener
- the listener to handle requests on the channel
java.rmi.RemoteException
- if an error occurs accepting channels
java.lang.IllegalArgumentException
- if any argument is nullvoid close(java.lang.String name)
name
- the channel name
java.lang.IllegalArgumentException
- if name
is nullvoid close() throws java.rmi.RemoteException
This closes all channels open on the connection, prior to notifying
registered ConnectionEventListener
instances
java.rmi.RemoteException
- if an error occurs closing the connectionvoid addConnectionEventListener(ConnectionEventListener listener)
listener
- the listener to addvoid removeConnectionEventListener(ConnectionEventListener listener)
listener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |