Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.invocation.http.server
Class HttpProxyFactory

    java.lang.Object
      org.jboss.mx.util.JBossNotificationBroadcasterSupport
          org.jboss.system.ServiceMBeanSupport
              org.jboss.invocation.http.server.HttpProxyFactory

All Implemented Interfaces:
  HttpProxyFactoryMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class HttpProxyFactory
extends org.jboss.system.ServiceMBeanSupport
implements HttpProxyFactoryMBean

Create an interface proxy that uses HTTP to communicate with the server side object that exposes the corresponding JMX invoke operation. Any request to this servlet receives a serialized object stream containing a MarshalledValue with the Naming proxy as its content.

Version:
  $Revision: 1.6 $
Author:
  Scott.Stark@jboss.org

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
`HttpProxyFactory()`

Method Summary
`protected void` | `checkInvokerURL()` Validate that the invokerURL is set, and if not build it from the invokerURLPrefix + host + invokerURLSuffix.
`protected Invoker` | `createInvoker()` Create the Invoker
`protected ArrayList` | `defineDefaultInterceptors()` Build the default interceptor list.
`Element` | `getClientInterceptors()`
`Class` | `getExportedInterface()` Get the RMI compatible interface that the HttpInvokerProxy implements
`javax.management.ObjectName` | `getInvokerName()` Get the server side mbean that exposes the invoke operation for the exported interface
`String` | `getInvokerURL()` Get the http URL to the InvokerServlet
`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.
`String` | `getJndiName()` Get the JNDI name under which the HttpInvokerProxy will be bound
`Object` | `getProxy()` Get the proxy instance created by the factory.
`Object` | `getProxy(Object id)` Create a new proxy instance with the given id, no jndi name and all other settings the same as the jndi bound proxy.
`boolean` | `getUseHostName()` A flag if the InetAddress.getHostName() or getHostAddress() method should be used as the host component of invokerURLPrefix + host + invokerURLSuffix.
`void` | `setClientInterceptors(Element config)`
`void` | `setExportedInterface(Class exportedInterface)` Set the RMI compatible interface that the HttpInvokerProxy implements
`void` | `setInvokerName(javax.management.ObjectName jmxInvokerName)` Set the server side mbean that exposes the invoke operation for the exported interface
`void` | `setInvokerURL(String invokerURL)` Set the http URL to the InvokerServlet
`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` | `setJndiName(String jndiName)` Set the JNDI name under which the HttpInvokerProxy will be bound
`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()` Initializes the servlet.
`protected void` | `stopService()`

Methods inherited from class org.jboss.system.ServiceMBeanSupport
`create, createService, destroy, destroyService, 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.Service
`create, destroy, start, stop`

Constructor Detail

### HttpProxyFactory

    public HttpProxyFactory()

Method Detail

### getInvokerName

    public javax.management.ObjectName getInvokerName()

  Description copied from interface: `HttpProxyFactoryMBean`
  Get the server side mbean that exposes the invoke operation for the exported interface

  Specified by:
    `getInvokerName` in interface `HttpProxyFactoryMBean`

### setInvokerName

    public void setInvokerName(javax.management.ObjectName jmxInvokerName)

  Description copied from interface: `HttpProxyFactoryMBean`
  Set the server side mbean that exposes the invoke operation for the exported interface

  Specified by:
    `setInvokerName` in interface `HttpProxyFactoryMBean`

### getJndiName

    public String getJndiName()

  Description copied from interface: `HttpProxyFactoryMBean`
  Get the JNDI name under which the HttpInvokerProxy will be bound

  Specified by:
    `getJndiName` in interface `HttpProxyFactoryMBean`

### setJndiName

    public void setJndiName(String jndiName)

  Description copied from interface: `HttpProxyFactoryMBean`
  Set the JNDI name under which the HttpInvokerProxy will be bound

  Specified by:
    `setJndiName` in interface `HttpProxyFactoryMBean`

### getInvokerURL

    public String getInvokerURL()

  Description copied from interface: `HttpProxyFactoryMBean`
  Get the http URL to the InvokerServlet

  Specified by:
    `getInvokerURL` in interface `HttpProxyFactoryMBean`

### setInvokerURL

    public void setInvokerURL(String invokerURL)

  Description copied from interface: `HttpProxyFactoryMBean`
  Set the http URL to the InvokerServlet

  Specified by:
    `setInvokerURL` in interface `HttpProxyFactoryMBean`

### getInvokerURLPrefix

    public String getInvokerURLPrefix()

  Description copied from interface: `HttpProxyFactoryMBean`
  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 `HttpProxyFactoryMBean`

### setInvokerURLPrefix

    public void setInvokerURLPrefix(String invokerURLPrefix)

  Description copied from interface: `HttpProxyFactoryMBean`
  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 `HttpProxyFactoryMBean`

### getInvokerURLSuffix

    public String getInvokerURLSuffix()

  Description copied from interface: `HttpProxyFactoryMBean`
  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 `HttpProxyFactoryMBean`

### setInvokerURLSuffix

    public void setInvokerURLSuffix(String invokerURLSuffix)

  Description copied from interface: `HttpProxyFactoryMBean`
  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 `HttpProxyFactoryMBean`

### getUseHostName

    public boolean getUseHostName()

  Description copied from interface: `HttpProxyFactoryMBean`
  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 `HttpProxyFactoryMBean`

### setUseHostName

    public void setUseHostName(boolean flag)

  Description copied from interface: `HttpProxyFactoryMBean`
  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 `HttpProxyFactoryMBean`

### getExportedInterface

    public Class getExportedInterface()

  Description copied from interface: `HttpProxyFactoryMBean`
  Get the RMI compatible interface that the HttpInvokerProxy implements

  Specified by:
    `getExportedInterface` in interface `HttpProxyFactoryMBean`

### setExportedInterface

    public void setExportedInterface(Class exportedInterface)

  Description copied from interface: `HttpProxyFactoryMBean`
  Set the RMI compatible interface that the HttpInvokerProxy implements

  Specified by:
    `setExportedInterface` in interface `HttpProxyFactoryMBean`

### getClientInterceptors

    public Element getClientInterceptors()

  Specified by:
    `getClientInterceptors` in interface `HttpProxyFactoryMBean`

### setClientInterceptors

    public void setClientInterceptors(Element config)
                               throws Exception

  Specified by:
    `setClientInterceptors` in interface `HttpProxyFactoryMBean`
  Throws:
    `Exception`

### getProxy

    public Object getProxy()

  Description copied from interface: `HttpProxyFactoryMBean`
  Get the proxy instance created by the factory.

  Specified by:
    `getProxy` in interface `HttpProxyFactoryMBean`

### getProxy

    public Object getProxy(Object id)

  Description copied from interface: `HttpProxyFactoryMBean`
  Create a new proxy instance with the given id, no jndi name and all other settings the same as the jndi bound proxy.

  Specified by:
    `getProxy` in interface `HttpProxyFactoryMBean`

### startService

    protected void startService()
                         throws Exception

  Initializes the servlet.

  Throws:
    `Exception`

### stopService

    protected void stopService()
                        throws Exception

  Throws:
    `Exception`

### defineDefaultInterceptors

    protected ArrayList defineDefaultInterceptors()

  Build the default interceptor list. This consists of: ClientMethodInterceptor InvokerInterceptor

### createInvoker

    protected Invoker createInvoker()
                             throws Exception

  Create the Invoker

  Throws:
    `Exception`

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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