|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.adaptors.AbstractAdaptor
public abstract class AbstractAdaptor
This abstract class abstracts the common behaviour of all Adaptors. All Protocol Adaptors must extend this class .
com.adventnet.adaptor.Adaptor,
com.adventnet.adaptor.Protocol,
Serialized Form| Nested Class Summary | |
|---|---|
class |
AbstractAdaptor.ProcessNotification
|
| Field Summary | |
|---|---|
(package private) static boolean |
handleNotificationinNewThread
|
protected java.util.Hashtable |
notifications
|
protected int |
port
|
protected AbstractAdaptor.ProcessNotification |
processnotification
|
protected int |
state
|
| Constructor Summary | |
|---|---|
AbstractAdaptor()
|
|
| Method Summary | |
|---|---|
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
This method can be used to Add a Notification Listener for this Adaptor |
protected abstract void |
bind()
Must be used to bind to a naming service or to bind to a ServerSocket |
void |
changeState(int i)
This method changes the state of the adaptor |
protected abstract void |
destroyAdaptor()
Kills the adaptor and releases all its resources |
abstract void |
enableAuthentication(boolean flag)
This abstract method needs to be implemented by the Adaptor for providing Authentication |
abstract void |
enableAuthorisation(boolean flag)
This abstract method needs to be implemented by the Adaptor for providing Authorisation |
abstract javax.management.ObjectName |
getAdaptorObjectName()
Returns the adaptor object name |
java.lang.String |
getAdaptorVersion()
Returns the adaptor version implemented by this Adaptor |
java.lang.String |
getHost()
This method returns the host on which the adaptor resides |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
This method returns the NotificationInfo |
int |
getPort()
This method returns the port on which the adaptor listens |
abstract java.lang.String |
getProtocol()
This abstract method returns the Protocol on which the adaptor is listening |
int |
getState()
This method returns the state of the adaptor |
java.lang.String |
getStateInString()
This method returns the state of the adaptor in string format |
void |
handleNotification(javax.management.Notification notification,
java.lang.Object handback)
This method redirects notification to the processNotification method if handleNotificationinNewThread is set to true. |
protected abstract void |
instantiateAdaptor()
Must be implemented by the adaptor and should be used to instantiate itsefl |
boolean |
isActive()
This method returns true if the Adaptor is in STARTING or STARTED state |
boolean |
isSecure()
Default returns false . |
void |
postDeregister()
This method must be implemented by the Adaptor if it wants to perform any Post Deregistration tasks |
void |
postRegister(java.lang.Boolean registrationDone)
This method must be overridden by the Adaptor if the Adaptor wants to perform any Post Registration tasks |
void |
preDeregister()
This method must be overridden by the Adaptor if it wants to perform any Pre Deregistration tasks |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer mbeanServer,
javax.management.ObjectName objectName)
This method must be overriden by the Adaptor if the Adaptor wants to perform any Pre registration tasks |
protected void |
processNotification(javax.management.Notification notification,
java.lang.Object handback)
Needs to overriden by the Adaptor implementation. |
void |
removeNotificationListener(javax.management.NotificationListener listener)
This method removes the Notification Listeners |
void |
setPort(int port)
This method sets the port on which this adaptor is listening |
void |
startService()
This method starts the Adaptor service |
void |
stopService()
This method stops the Adaptor |
protected abstract void |
unbind()
Must be used to unbind from a naming service or to relese a ServerSocket |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int port
protected int state
protected AbstractAdaptor.ProcessNotification processnotification
protected java.util.Hashtable notifications
static boolean handleNotificationinNewThread
| Constructor Detail |
|---|
public AbstractAdaptor()
| Method Detail |
|---|
public java.lang.String getHost()
getHost in interface Adaptorpublic int getPort()
getPort in interface Adaptorpublic abstract java.lang.String getProtocol()
getProtocol in interface Adaptorpublic int getState()
getState in interface Adaptorpublic java.lang.String getStateInString()
getStateInString in interface Adaptor
public void setPort(int port)
throws java.lang.IllegalStateException
setPort in interface Adaptorjava.lang.IllegalStateException - if the adaptor is STARTING or STARTEDpublic boolean isActive()
isActive in interface Adaptorpublic boolean isSecure()
isSecure in interface Adaptor
public abstract void enableAuthorisation(boolean flag)
throws java.lang.UnsupportedOperationException
enableAuthorisation in interface Adaptorjava.lang.UnsupportedOperationException - when authorisation is not suppported
public abstract void enableAuthentication(boolean flag)
throws java.lang.UnsupportedOperationException
enableAuthentication in interface Adaptorjava.lang.UnsupportedOperationException - when authentication is not supported
public void startService()
throws java.lang.IllegalStateException,
java.lang.Exception
startService in interface Adaptorjava.lang.IllegalStateException - when the adaptor is in STARTED or STARTING state
java.lang.Exception
public void stopService()
throws java.lang.IllegalStateException
stopService in interface Adaptorjava.lang.IllegalStateException - when the adaptor is in STOPPED or STOPPING state
protected abstract void instantiateAdaptor()
throws java.lang.InstantiationException
java.lang.InstantiationExceptionprotected abstract void bind()
protected abstract void unbind()
protected abstract void destroyAdaptor()
public java.lang.String getAdaptorVersion()
getAdaptorVersion in interface Adaptorpublic abstract javax.management.ObjectName getAdaptorObjectName()
getAdaptorObjectName in interface Adaptor
public void addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws java.lang.IllegalArgumentException
addNotificationListener in interface javax.management.NotificationBroadcasterjava.lang.IllegalArgumentExceptionpublic javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface javax.management.NotificationBroadcaster
public void removeNotificationListener(javax.management.NotificationListener listener)
throws javax.management.ListenerNotFoundException
removeNotificationListener in interface javax.management.NotificationBroadcasterjavax.management.ListenerNotFoundExceptionpublic void changeState(int i)
protected void processNotification(javax.management.Notification notification,
java.lang.Object handback)
public final void handleNotification(javax.management.Notification notification,
java.lang.Object handback)
public javax.management.ObjectName preRegister(javax.management.MBeanServer mbeanServer,
javax.management.ObjectName objectName)
throws java.lang.Exception
preRegister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistration
public void preDeregister()
throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||