public class PipedChannelBroker extends Object implements ChannelBroker
PipedInputStream and PipedOutputStream.ChannelAcceptor.ListenerChannelConnector.Listener| Modifier and Type | Method and Description |
|---|---|
Channel |
accept()
Blocks until a channel is accepted.
|
void |
accept(ChannelAcceptor.Listener listener)
Register a listener which is asynchronously given an accepted channel.
|
Channel |
accept(long timeout,
TimeUnit unit)
Blocks until a channel is accepted.
|
Channel |
accept(Timer timer)
Blocks until a channel is accepted.
|
void |
close()
Prevents new channels from being accepted and closes all accepted
channels.
|
Channel |
connect()
Returns a new channel, possibly blocking until it has been established.
|
void |
connect(ChannelConnector.Listener listener)
Register a listener which is asynchronously given a connected channel.
|
Channel |
connect(long timeout,
TimeUnit unit)
Returns a new channel, possibly blocking until it has been established.
|
Channel |
connect(Timer timer)
Returns a new channel, possibly blocking until it has been established.
|
Object |
getLocalAddress() |
Object |
getRemoteAddress() |
static ChannelBroker[] |
newPair(IOExecutor executor)
Returns a pair of connected brokers.
|
static ChannelBroker[] |
newPair(IOExecutor executor,
int bufferSize)
Returns a pair of connected brokers.
|
public static ChannelBroker[] newPair(IOExecutor executor)
public static ChannelBroker[] newPair(IOExecutor executor, int bufferSize)
public Object getLocalAddress()
getLocalAddress in interface ChannelAcceptorgetLocalAddress in interface ChannelConnectorpublic Object getRemoteAddress()
getRemoteAddress in interface ChannelConnectorpublic Channel connect() throws IOException
ChannelConnectorconnect in interface ChannelConnectorIOExceptionpublic Channel connect(long timeout, TimeUnit unit) throws IOException
ChannelConnectorconnect in interface ChannelConnectorIOExceptionpublic Channel connect(Timer timer) throws IOException
ChannelConnectorconnect in interface ChannelConnectorIOExceptionpublic void connect(ChannelConnector.Listener listener)
ChannelConnectorconnect in interface ChannelConnectorpublic Channel accept() throws IOException
ChannelAcceptoraccept in interface ChannelAcceptorIOExceptionpublic Channel accept(long timeout, TimeUnit unit) throws IOException
ChannelAcceptoraccept in interface ChannelAcceptorIOExceptionpublic Channel accept(Timer timer) throws IOException
ChannelAcceptoraccept in interface ChannelAcceptorIOExceptionpublic void accept(ChannelAcceptor.Listener listener)
ChannelAcceptoraccept in interface ChannelAcceptorpublic void close()
ChannelAcceptorclose in interface Closeableclose in interface AutoCloseableclose in interface ChannelAcceptorclose in interface ChannelConnectorCopyright © 2006–2015 Cojen. All rights reserved.