com.sun.sgs.impl.io
Class AbstractSocketEndpoint

java.lang.Object
  extended by com.sun.sgs.impl.io.AbstractSocketEndpoint
Direct Known Subclasses:
ServerSocketEndpoint, SocketEndpoint

abstract class AbstractSocketEndpoint
extends Object


Field Summary
protected  SocketAddress address
          The socket address this endpoint encapsulates.
protected  Executor executor
          The Executor used by this endpoint's connector or acceptor.
protected  int numProcessors
          A MINA configuration parameter whose value may affect performance.
protected  TransportType transportType
          The transport type this endpoint encapsulates.
 
Constructor Summary
protected AbstractSocketEndpoint(SocketAddress address, TransportType type)
          Constructs an AbstractSocketEndpoint with the given TransportType.
protected AbstractSocketEndpoint(SocketAddress address, TransportType type, Executor executor, int numProcessors)
          Constructs an AbstractSocketEndpoint with the given TransportType using the given Executor for thread management.
 
Method Summary
 SocketAddress getAddress()
          Returns the SocketAddress encapsulated by this endpoint.
 Executor getExecutor()
          Returns the Executor encapsulated by this endpoint.
 int getNumProcessors()
          Returns the number of processors available to the MINA framework.
 TransportType getTransportType()
          Returns the TransportType encapsulated by this endpoint.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

address

protected final SocketAddress address
The socket address this endpoint encapsulates.


transportType

protected final TransportType transportType
The transport type this endpoint encapsulates.


executor

protected final Executor executor
The Executor used by this endpoint's connector or acceptor.


numProcessors

protected final int numProcessors
A MINA configuration parameter whose value may affect performance.

Constructor Detail

AbstractSocketEndpoint

protected AbstractSocketEndpoint(SocketAddress address,
                                 TransportType type)
Constructs an AbstractSocketEndpoint with the given TransportType. This is the simplest way to create an AbstractSocketEndpoint. The returned endpoint will use a cached pool of daemon threads as necessary for processing events.

Parameters:
address - the socket address to encapsulate
type - the type of transport

AbstractSocketEndpoint

protected AbstractSocketEndpoint(SocketAddress address,
                                 TransportType type,
                                 Executor executor,
                                 int numProcessors)
Constructs an AbstractSocketEndpoint with the given TransportType using the given Executor for thread management. The numProcessors parameter refers to the number of MINA SocketIOProcessors to initially create. numProcessors must be greater than 0.

(Note: A SocketIOProcessor is a MINA implementation detail that controls the internal processing of the IO. It is exposed here to allow clients the option to configure this value, which may aid performance tuning).

Parameters:
address - the socket address to encapsulate
type - the type of transport
executor - An Executor specifying the threading policy
numProcessors - the number of processors available on this system. This value must be greater than 0.
Throws:
IllegalArgumentException - if numProcessors is zero or negative.
Method Detail

getAddress

public SocketAddress getAddress()
Returns the SocketAddress encapsulated by this endpoint.

Returns:
the SocketAddress encapsulated by this endpoint

getTransportType

public TransportType getTransportType()
Returns the TransportType encapsulated by this endpoint.

Returns:
the TransportType encapsulated by this endpoint

getExecutor

public Executor getExecutor()
Returns the Executor encapsulated by this endpoint.

Returns:
the Executor encapsulated by this endpoint

getNumProcessors

public int getNumProcessors()
Returns the number of processors available to the MINA framework.

Returns:
the number of processors available to the MINA framework

toString

public String toString()

Overrides:
toString in class Object

Project Darkstar, Version 0.9.11.3
2013-07-29 21:53:29

Copyright © 2007-2013 Sun Microsystems, Inc. All rights reserved