|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.spray.connector.DefaultConnector
org.norther.tammi.spray.connector.DefaultExecutableConnector
public class DefaultExecutableConnector
A default implementation of ExecutableConnector. The run method must be implemented by subclasses.
| 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 | |
|---|---|
|
DefaultExecutableConnector()
Constructs a new connector. |
protected |
DefaultExecutableConnector(InetAddress addr)
Constructs a connector with a host address. |
| Method Summary | |
|---|---|
protected void |
execute(Connection connection)
Executes the specified connection. |
int |
getConnectionCount()
Gets a snapshot of the number of active and idle connections. |
protected MBeanReference<Executor> |
getExecutorMBean()
Gets a reference to the executor MBean. |
ObjectName |
getExecutorName()
Gets the the executor of this executable. |
ObjectName |
getRequestExecutorName()
Gets the executor for requests. |
boolean |
isStarted()
Checks whether the startable has been started. |
void |
premanaged(MBeanDelegate adapter)
This method is called when the implementing adaptee is trying to be managed either during pre-registration of the corresponding adapter MBean or just before it is explicitly added to the adapter MBean during run-time. |
void |
run()
|
void |
setExecutorName(ObjectName executor)
Sets the executor of this executable. |
void |
setRequestExecutorName(ObjectName executor)
Sets the executor for requests. |
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.DefaultConnector |
|---|
getAddress, getConnectionTimeout, getFilterMBean, getFilterName, getInetAddress, getKeyAlias, getLoggerMBean, getLoggerName, getMaxIdleConnections, getName, getPort, getProvider, getRedirectPort, getRequestTimeout, getTimeoutMBean, isKeepConnection, isLoggingDisabled, isSecure, keepConnection, postmanaged, 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.Connector |
|---|
getAddress, getConnectionTimeout, getFilterName, getKeyAlias, getLoggerName, getMaxIdleConnections, getName, getPort, getProvider, getRedirectPort, getRequestTimeout, isKeepConnection, isLoggingDisabled, isSecure, keepConnection, setConnectionTimeout, setFilterName, setKeyAlias, setKeyPassword, setLoggerName, setLoggingDisabled, setMaxIdleConnections, setPort, setProvider, setRedirectPort, setRequestTimeout, setSecure |
| Constructor Detail |
|---|
public DefaultExecutableConnector()
protected DefaultExecutableConnector(InetAddress addr)
addr - the host address.| Method Detail |
|---|
public void premanaged(MBeanDelegate adapter)
throws Exception
Manageable
premanaged in interface Manageablepremanaged in class Adapteeadapter - the managing adapter.
Exception - if the adaptee refused to be managed.
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class DefaultConnectorException - if the adaptee refused to be unmanaged.public int getConnectionCount()
ConnectorNote that the count is implementation dependent and its accuracy may vary.
getConnectionCount in interface ConnectorgetConnectionCount in interface ExecutableConnectorgetConnectionCount in class DefaultConnectorpublic ObjectName getRequestExecutorName()
ExecutableConnector
getRequestExecutorName in interface ExecutableConnectorpublic void setRequestExecutorName(ObjectName executor)
ExecutableConnector
setRequestExecutorName in interface ExecutableConnectorexecutor - the name of the executor or a query.public ObjectName getExecutorName()
Executable
getExecutorName in interface Executablepublic void setExecutorName(ObjectName executor)
ExecutableNote that it will be taken into use after next start.
setExecutorName in interface Executableexecutor - the object name of the executor or a query.public boolean isStarted()
Startable
isStarted in interface StartableisStarted in class DefaultConnector
public void start()
throws Exception
Startable
start in interface Startablestart in class DefaultConnectorException - if start fails.public void stop()
Startable
stop in interface Startablestop in class DefaultConnectorpublic void run()
run in interface Runnableprotected MBeanReference<Executor> getExecutorMBean()
protected void execute(Connection connection)
connection - the connection.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||