org.jboss.invocation.http.server
Class HttpInvoker

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.invocation.http.server.HttpInvoker
All Implemented Interfaces:
HttpInvokerMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class HttpInvoker
extends org.jboss.system.ServiceMBeanSupport
implements HttpInvokerMBean

The HttpInvoker ... into the JMX base.

Version:
$Revision: 1.1.2.6 $
Author:
Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
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()
           
 String getInvokerURL()
          Get the URL string of the servlet that will handle posts from the HttpInvokerProxy
 String getInvokerURLPrefix()
          If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix.
 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 importTPC(Object tpc)
          Not implemented, and should not be
 Object invoke(Invocation invocation)
          Invoke a Remote interface method.
 void setInvokerURL(String invokerURL)
          Get the URL string of the servlet that will handle posts from the HttpInvokerProxy.
 void setInvokerURLPrefix(String invokerURLPrefix)
          If there is no invokerURL set, then one will be constructed via the concatenation of invokerURLPrefix + the local host + invokerURLSuffix.
 void setInvokerURLSuffix(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()
           
protected  void stopService()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
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
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
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

HttpInvoker

public HttpInvoker()
Method Detail

getInvokerURL

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

Specified by:
getInvokerURL in interface HttpInvokerMBean

setInvokerURL

public void setInvokerURL(String invokerURL)
Description copied from interface: HttpInvokerMBean
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

getInvokerURLPrefix

public String getInvokerURLPrefix()
Description copied from interface: HttpInvokerMBean
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

setInvokerURLPrefix

public void setInvokerURLPrefix(String invokerURLPrefix)
Description copied from interface: HttpInvokerMBean
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

getInvokerURLSuffix

public String getInvokerURLSuffix()
Description copied from interface: HttpInvokerMBean
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

setInvokerURLSuffix

public void setInvokerURLSuffix(String invokerURLSuffix)
Description copied from interface: HttpInvokerMBean
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

getUseHostName

public boolean getUseHostName()
Description copied from interface: HttpInvokerMBean
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

setUseHostName

public void setUseHostName(boolean flag)
Description copied from interface: HttpInvokerMBean
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

startService

protected void startService()
                     throws Exception
Throws:
Exception

stopService

protected void stopService()

destroyService

protected void destroyService()

invoke

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

Specified by:
invoke in interface HttpInvokerMBean
Throws:
Exception

importTPC

protected Transaction importTPC(Object tpc)
Not implemented, and should not be


checkInvokerURL

protected void checkInvokerURL()
                        throws 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:
UnknownHostException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.