org.norther.tammi.spray.connector
Class DefaultLocalConnector

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.spray.connector.DefaultConnector
          extended by org.norther.tammi.spray.connector.DefaultExecutableConnector
              extended by org.norther.tammi.spray.connector.DefaultTCPConnector
                  extended by org.norther.tammi.spray.connector.DefaultLocalConnector
All Implemented Interfaces:
Serializable, Runnable, NotificationBroadcaster, NotificationEmitter, Manageable, MBeanDelegate, Startable, Executable, Connector, ExecutableConnector, LocalConnector, TCPConnector
Direct Known Subclasses:
DefaultSocketConnector

public class DefaultLocalConnector
extends DefaultTCPConnector
implements LocalConnector

A default implementation of LocalConnector.

Version:
$Id: DefaultLocalConnector.java,v 1.12 2009/09/28 15:08:30 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.norther.tammi.spray.connector.DefaultConnector
LOCALHOST
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Constructor Summary
  DefaultLocalConnector()
          Constructs a new connector.
protected DefaultLocalConnector(InetAddress addr)
          Constructs a connector with a host address.
 
Method Summary
 boolean isClientAuthNeeded()
          Checks whether client authentication is needed.
 boolean isClientAuthWanted()
          Checks whether client authentication is wanted.
 boolean keepConnection(Connection con)
          Keeps the specified connection alive on idle after processing the corresponding request if applicable.
 void postmanaged()
          This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time.
 void run()
           
 void setClientAuthNeeded(boolean flag)
          Sets whether client authentication is needed.
 void setClientAuthWanted(boolean flag)
          Sets whether client authentication is wanted.
 void start()
          Starts the MBean.
 void stop()
          Stops the MBean.
 void unmanaged()
          This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time.
 
Methods inherited from class org.norther.tammi.spray.connector.DefaultTCPConnector
getReceiveBufferSize, getSendBufferSize, getServerBufferSize, getSoLinger, getSoTimeout, isTcpNoDelay, setReceiveBufferSize, setSendBufferSize, setServerBufferSize, setSoLinger, setSoTimeout, setTcpNoDelay
 
Methods inherited from class org.norther.tammi.spray.connector.DefaultExecutableConnector
execute, getConnectionCount, getExecutorMBean, getExecutorName, getRequestExecutorName, isStarted, premanaged, setExecutorName, setRequestExecutorName
 
Methods inherited from class org.norther.tammi.spray.connector.DefaultConnector
getAddress, getConnectionTimeout, getFilterMBean, getFilterName, getInetAddress, getKeyAlias, getLoggerMBean, getLoggerName, getMaxIdleConnections, getName, getPort, getProvider, getRedirectPort, getRequestTimeout, getTimeoutMBean, isKeepConnection, isLoggingDisabled, isSecure, setAddress, setConnectionTimeout, setFilterName, setInetAddress, setKeyAlias, setKeyPassword, setLoggerName, setLoggingDisabled, setMaxIdleConnections, setPort, setProvider, setRedirectPort, setRequestTimeout, setSecure
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.spray.connector.LocalConnector
setMaxIdleConnections
 
Methods inherited from interface org.norther.tammi.spray.connector.TCPConnector
getReceiveBufferSize, getSendBufferSize, getServerBufferSize, getSoLinger, getSoTimeout, isTcpNoDelay, setReceiveBufferSize, setSendBufferSize, setServerBufferSize, setSoLinger, setSoTimeout, setTcpNoDelay
 
Methods inherited from interface org.norther.tammi.spray.connector.ExecutableConnector
getConnectionCount, getRequestExecutorName, setRequestExecutorName
 
Methods inherited from interface org.norther.tammi.spray.connector.Connector
getAddress, getConnectionTimeout, getFilterName, getKeyAlias, getLoggerName, getMaxIdleConnections, getName, getPort, getProvider, getRedirectPort, getRequestTimeout, isKeepConnection, isLoggingDisabled, isSecure, setConnectionTimeout, setFilterName, setKeyAlias, setKeyPassword, setLoggerName, setLoggingDisabled, setPort, setProvider, setRedirectPort, setRequestTimeout, setSecure
 
Methods inherited from interface org.norther.tammi.core.thread.Executable
getExecutorName, setExecutorName
 
Methods inherited from interface org.norther.tammi.core.base.Startable
isStarted
 

Constructor Detail

DefaultLocalConnector

public DefaultLocalConnector()
Constructs a new connector.


DefaultLocalConnector

protected DefaultLocalConnector(InetAddress addr)
Constructs a connector with a host address.

Parameters:
addr - the host address.
Method Detail

postmanaged

public void postmanaged()
Description copied from interface: Manageable
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time.

Specified by:
postmanaged in interface Manageable
Overrides:
postmanaged in class DefaultConnector

unmanaged

public void unmanaged()
               throws Exception
Description copied from interface: Manageable
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time.

Specified by:
unmanaged in interface Manageable
Overrides:
unmanaged in class DefaultExecutableConnector
Throws:
Exception - if the adaptee refused to be unmanaged.

keepConnection

public boolean keepConnection(Connection con)
Description copied from interface: Connector
Keeps the specified connection alive on idle after processing the corresponding request if applicable.

Specified by:
keepConnection in interface Connector
Overrides:
keepConnection in class DefaultConnector
Parameters:
con - the connection.
Returns:
true if kept, false otherwise.

isClientAuthWanted

public boolean isClientAuthWanted()
Description copied from interface: LocalConnector
Checks whether client authentication is wanted.

Specified by:
isClientAuthWanted in interface LocalConnector
Returns:
true for client authentication, false otherwise.

setClientAuthWanted

public void setClientAuthWanted(boolean flag)
Description copied from interface: LocalConnector
Sets whether client authentication is wanted.

Specified by:
setClientAuthWanted in interface LocalConnector
Parameters:
flag - true for client authentication, false otherwise.

isClientAuthNeeded

public boolean isClientAuthNeeded()
Description copied from interface: LocalConnector
Checks whether client authentication is needed.

Specified by:
isClientAuthNeeded in interface LocalConnector
Returns:
true for client authentication, false otherwise.

setClientAuthNeeded

public void setClientAuthNeeded(boolean flag)
Description copied from interface: LocalConnector
Sets whether client authentication is needed.

Specified by:
setClientAuthNeeded in interface LocalConnector
Parameters:
flag - true for client authentication, false otherwise.

start

public void start()
           throws Exception
Description copied from interface: Startable
Starts the MBean.

Specified by:
start in interface Startable
Overrides:
start in class DefaultExecutableConnector
Throws:
Exception - if start fails.

stop

public void stop()
Description copied from interface: Startable
Stops the MBean.

Specified by:
stop in interface Startable
Overrides:
stop in class DefaultExecutableConnector

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class DefaultExecutableConnector


Copyright © 2004 The Norther Organization. All rights reserved.