org.apache.mina.transport.vmpipe
Class VmPipeAcceptor

java.lang.Object
  extended by org.apache.mina.core.service.AbstractIoService
      extended by org.apache.mina.core.service.AbstractIoAcceptor
          extended by org.apache.mina.transport.vmpipe.VmPipeAcceptor
All Implemented Interfaces:
IoAcceptor, IoService

public final class VmPipeAcceptor
extends AbstractIoAcceptor

Binds the specified IoHandler to the specified VmPipeAddress.

Version:
$Rev: 671827 $, $Date: 2008-06-26 10:49:48 +0200 (jeu, 26 jun 2008) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.mina.core.service.AbstractIoAcceptor
AbstractIoAcceptor.AcceptorOperationFuture
 
Nested classes/interfaces inherited from class org.apache.mina.core.service.AbstractIoService
AbstractIoService.ServiceOperationFuture
 
Field Summary
 
Fields inherited from class org.apache.mina.core.service.AbstractIoAcceptor
bindLock
 
Fields inherited from class org.apache.mina.core.service.AbstractIoService
disposalLock
 
Constructor Summary
VmPipeAcceptor()
          Creates a new instance.
VmPipeAcceptor(Executor executor)
          Creates a new instance.
 
Method Summary
protected  Set<SocketAddress> bind0(List<? extends SocketAddress> localAddresses)
          Implement this method to perform the actual bind operation.
protected  IoFuture dispose0()
          Implement this method to release any acquired resources.
 VmPipeAddress getDefaultLocalAddress()
          Returns the default local address to bind when no argument is specified in IoAcceptor.bind() method.
 VmPipeAddress getLocalAddress()
          Returns the local address which is bound currently.
 VmPipeSessionConfig getSessionConfig()
          Returns the default configuration of the new IoSessions created by this service.
 TransportMetadata getTransportMetadata()
          Returns the TransportMetadata that this service runs on.
 IoSession newSession(SocketAddress remoteAddress, SocketAddress localAddress)
          (Optional) Returns an IoSession that is bound to the specified localAddress and the specified remoteAddress which reuses the local address that is already bound by this service.
 void setDefaultLocalAddress(VmPipeAddress localAddress)
           
protected  void unbind0(List<? extends SocketAddress> localAddresses)
          Implement this method to perform the actual unbind operation.
 
Methods inherited from class org.apache.mina.core.service.AbstractIoAcceptor
bind, bind, bind, bind, getDefaultLocalAddresses, getLocalAddresses, isCloseOnDeactivation, setCloseOnDeactivation, setDefaultLocalAddress, setDefaultLocalAddresses, setDefaultLocalAddresses, setDefaultLocalAddresses, toString, unbind, unbind, unbind, unbind
 
Methods inherited from class org.apache.mina.core.service.AbstractIoService
addListener, broadcast, dispose, executeWorker, executeWorker, finishSessionInitialization, finishSessionInitialization0, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getIdleState, getIdleStatusChecker, getListeners, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getStatistics, isActive, isDisposed, isDisposing, notifyIdleness, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.mina.core.service.IoService
addListener, broadcast, dispose, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getIdleState, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getStatistics, isActive, isDisposed, isDisposing, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactory
 

Constructor Detail

VmPipeAcceptor

public VmPipeAcceptor()
Creates a new instance.


VmPipeAcceptor

public VmPipeAcceptor(Executor executor)
Creates a new instance.

Method Detail

getTransportMetadata

public TransportMetadata getTransportMetadata()
Description copied from interface: IoService
Returns the TransportMetadata that this service runs on.


getSessionConfig

public VmPipeSessionConfig getSessionConfig()
Description copied from class: AbstractIoService
Returns the default configuration of the new IoSessions created by this service.

Specified by:
getSessionConfig in interface IoService
Overrides:
getSessionConfig in class AbstractIoService

getLocalAddress

public VmPipeAddress getLocalAddress()
Description copied from class: AbstractIoAcceptor
Returns the local address which is bound currently. If more than one address are bound, only one of them will be returned, but it's not necessarily the firstly bound address.

Specified by:
getLocalAddress in interface IoAcceptor
Overrides:
getLocalAddress in class AbstractIoAcceptor

getDefaultLocalAddress

public VmPipeAddress getDefaultLocalAddress()
Description copied from class: AbstractIoAcceptor
Returns the default local address to bind when no argument is specified in IoAcceptor.bind() method. Please note that the default will not be used if any local address is specified. If more than one address are set, only one of them will be returned, but it's not necessarily the firstly specified address in IoAcceptor.setDefaultLocalAddresses(List).

Specified by:
getDefaultLocalAddress in interface IoAcceptor
Overrides:
getDefaultLocalAddress in class AbstractIoAcceptor

setDefaultLocalAddress

public void setDefaultLocalAddress(VmPipeAddress localAddress)

dispose0

protected IoFuture dispose0()
                     throws Exception
Description copied from class: AbstractIoService
Implement this method to release any acquired resources. This method is invoked only once by AbstractIoService.dispose().

Specified by:
dispose0 in class AbstractIoService
Throws:
Exception

bind0

protected Set<SocketAddress> bind0(List<? extends SocketAddress> localAddresses)
                            throws IOException
Description copied from class: AbstractIoAcceptor
Implement this method to perform the actual bind operation.

Specified by:
bind0 in class AbstractIoAcceptor
Returns:
the Set of the local addresses which is bound actually
Throws:
IOException

unbind0

protected void unbind0(List<? extends SocketAddress> localAddresses)
Description copied from class: AbstractIoAcceptor
Implement this method to perform the actual unbind operation.

Specified by:
unbind0 in class AbstractIoAcceptor

newSession

public IoSession newSession(SocketAddress remoteAddress,
                            SocketAddress localAddress)
Description copied from interface: IoAcceptor
(Optional) Returns an IoSession that is bound to the specified localAddress and the specified remoteAddress which reuses the local address that is already bound by this service.

This operation is optional. Please throw UnsupportedOperationException if the transport type doesn't support this operation. This operation is usually implemented for connectionless transport types.



Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.