org.apache.geronimo.gshell.whisper.transport.base
Class BaseTransport<T extends org.apache.mina.common.IoConnector>
java.lang.Object
org.apache.geronimo.gshell.whisper.transport.base.BaseService
org.apache.geronimo.gshell.whisper.transport.base.BaseTransport<T>
- All Implemented Interfaces:
- Closeable, Transport
- Direct Known Subclasses:
- TcpTransport, VmTransport
public abstract class BaseTransport<T extends org.apache.mina.common.IoConnector>
- extends BaseService
- implements Transport
Support for Transport implementations.
- Version:
- $Rev: 580731 $ $Date: 2007-09-30 07:52:42 -0700 (Sun, 30 Sep 2007) $
remoteLocation
protected URI remoteLocation
remoteAddress
protected SocketAddress remoteAddress
localLocation
protected URI localLocation
localAddress
protected SocketAddress localAddress
connector
protected T extends org.apache.mina.common.IoConnector connector
session
protected org.apache.mina.common.IoSession session
BaseTransport
protected BaseTransport(AddressFactory addressFactory)
createConfiguration
protected abstract Transport.Configuration createConfiguration()
getConfiguration
public Transport.Configuration getConfiguration()
- Specified by:
getConfiguration in interface Transport
setConfiguration
public void setConfiguration(Transport.Configuration config)
- Specified by:
setConfiguration in interface Transport
getBaseConfiguration
protected BaseConfiguration getBaseConfiguration()
- Specified by:
getBaseConfiguration in class BaseService
createThreadModel
protected org.apache.mina.common.ThreadModel createThreadModel()
throws Exception
- Overrides:
createThreadModel in class BaseService
- Throws:
Exception
createConnector
protected abstract T createConnector()
throws Exception
- Throws:
Exception
close
public void close()
- Specified by:
close in interface Closeable- Specified by:
close in interface Transport- Overrides:
close in class BaseService
getRemote
public URI getRemote()
- Specified by:
getRemote in interface Transport
getLocal
public URI getLocal()
- Specified by:
getLocal in interface Transport
getConnector
public T getConnector()
- Specified by:
getConnector in interface Transport
getSession
public org.apache.mina.common.IoSession getSession()
- Specified by:
getSession in interface Transport
getInputStream
public InputStream getInputStream()
- Specified by:
getInputStream in interface Transport
getOutputStream
public OutputStream getOutputStream()
- Specified by:
getOutputStream in interface Transport
getErrorStream
public OutputStream getErrorStream()
- Specified by:
getErrorStream in interface Transport
send
public org.apache.mina.common.WriteFuture send(Object msg)
throws Exception
- Specified by:
send in interface Transport
- Throws:
Exception
request
public Message request(Message msg)
throws Exception
- Specified by:
request in interface Transport
- Throws:
Exception
request
public Message request(Message msg,
Duration timeout)
throws Exception
- Specified by:
request in interface Transport
- Throws:
Exception
addListener
public void addListener(Transport.Listener listener)
- Specified by:
addListener in interface Transport
removeListener
public void removeListener(Transport.Listener listener)
- Specified by:
removeListener in interface Transport
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.