org.jboss.invocation.http.server
Class HttpInvoker

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.invocation.http.server.HttpInvoker
All Implemented Interfaces:
HttpInvokerMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)
Direct Known Subclasses:
HttpInvokerHA (src)

public class HttpInvoker
extends ServiceMBeanSupport (src)
implements HttpInvokerMBean (src)

The HttpInvoker ... into the JMX base.


Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
HttpInvoker()
           
 
Method Summary
protected  void checkInvokerURL()
          Validate that the invokerURL is set, and if not build it from the invokerURLPrefix + host + invokerURLSuffix.
protected  void destroyService()
          Sub-classes should override this method to provide custum 'destroy' logic.
 java.lang.String getInvokerURL()
          Get the URL string of the servlet that will handle posts from the HttpInvokerProxy
 java.lang.String getInvokerURLPrefix()
          If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix.
 java.lang.String getInvokerURLSuffix()
          If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix.
 boolean getUseHostName()
          A flag if the InetAddress.getHostName() or getHostAddress() method should be used as the host component of invokerURLPrefix + host + invokerURLSuffix.
protected  Transaction (src) importTPC(java.lang.Object tpc)
          Not implemented, and should not be
 java.lang.Object invoke(Invocation (src)  invocation)
          Invoke a Remote interface method.
 void setInvokerURL(java.lang.String invokerURL)
          Get the URL string of the servlet that will handle posts from the HttpInvokerProxy.
 void setInvokerURLPrefix(java.lang.String invokerURLPrefix)
          If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix.
 void setInvokerURLSuffix(java.lang.String invokerURLSuffix)
          If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix.
 void setUseHostName(boolean flag)
          A flag if the InetAddress.getHostName() or getHostAddress() method should be used as the host component of invokerURLPrefix + host + invokerURLSuffix.
protected  void startService()
          Sub-classes should override this method to provide custum 'start' logic.
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean (src)
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Constructor Detail

HttpInvoker

public HttpInvoker()
Method Detail

getInvokerURL

public java.lang.String getInvokerURL()
Description copied from interface: HttpInvokerMBean (src)
Get the URL string of the servlet that will handle posts from the HttpInvokerProxy

Specified by:
getInvokerURL in interface HttpInvokerMBean (src)

setInvokerURL

public void setInvokerURL(java.lang.String invokerURL)
Description copied from interface: HttpInvokerMBean (src)
Get the URL string of the servlet that will handle posts from the HttpInvokerProxy. For example, http://webhost:8080/invoker/JMXInvokerServlet

Specified by:
setInvokerURL in interface HttpInvokerMBean (src)

getInvokerURLPrefix

public java.lang.String getInvokerURLPrefix()
Description copied from interface: HttpInvokerMBean (src)
If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix.

Specified by:
getInvokerURLPrefix in interface HttpInvokerMBean (src)

setInvokerURLPrefix

public void setInvokerURLPrefix(java.lang.String invokerURLPrefix)
Description copied from interface: HttpInvokerMBean (src)
If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix. An example prefix is "http://", and this is the default value.

Specified by:
setInvokerURLPrefix in interface HttpInvokerMBean (src)

getInvokerURLSuffix

public java.lang.String getInvokerURLSuffix()
Description copied from interface: HttpInvokerMBean (src)
If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix.

Specified by:
getInvokerURLSuffix in interface HttpInvokerMBean (src)

setInvokerURLSuffix

public void setInvokerURLSuffix(java.lang.String invokerURLSuffix)
Description copied from interface: HttpInvokerMBean (src)
If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix. An example suffix is "/invoker/JMXInvokerServlet" and this is the default value.

Specified by:
setInvokerURLSuffix in interface HttpInvokerMBean (src)

getUseHostName

public boolean getUseHostName()
Description copied from interface: HttpInvokerMBean (src)
A flag if the InetAddress.getHostName() or getHostAddress() method should be used as the host component of invokerURLPrefix + host + invokerURLSuffix. If true getHostName() is used, false getHostAddress().

Specified by:
getUseHostName in interface HttpInvokerMBean (src)

setUseHostName

public void setUseHostName(boolean flag)
Description copied from interface: HttpInvokerMBean (src)
A flag if the InetAddress.getHostName() or getHostAddress() method should be used as the host component of invokerURLPrefix + host + invokerURLSuffix. If true getHostName() is used, false getHostAddress().

Specified by:
setUseHostName in interface HttpInvokerMBean (src)

startService

protected void startService()
                     throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

protected void stopService()
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)

destroyService

protected void destroyService()
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'destroy' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
destroyService in class ServiceMBeanSupport (src)

invoke

public java.lang.Object invoke(Invocation (src)  invocation)
                        throws java.lang.Exception
Invoke a Remote interface method.

Specified by:
invoke in interface HttpInvokerMBean (src)
Throws:
java.lang.Exception

importTPC

protected Transaction (src)  importTPC(java.lang.Object tpc)
Not implemented, and should not be


checkInvokerURL

protected void checkInvokerURL()
                        throws java.net.UnknownHostException
Validate that the invokerURL is set, and if not build it from the invokerURLPrefix + host + invokerURLSuffix. The host value will be taken from the jboss.bind.address system property if its a valid address, InetAddress.getLocalHost otherwise.

Throws:
java.net.UnknownHostException