org.apache.axis2.transport.base
Class ProtocolEndpoint

java.lang.Object
  extended by org.apache.axis2.transport.base.ProtocolEndpoint
Direct Known Subclasses:
AbstractPollTableEntry, DatagramEndpoint

public abstract class ProtocolEndpoint
extends java.lang.Object

Describes a protocol specific endpoint. This might be a TCP/UDP port, a mail account, a JMS destination, etc. Typically, a protocol specific endpoint is mapped to a service.


Constructor Summary
ProtocolEndpoint()
           
 
Method Summary
 MessageContext createMessageContext()
           
protected  ConfigurationContext getConfigurationContext()
          Get the Axis2 configuration context.
 java.lang.String getDescription()
          Get a short description of this endpoint suitable for inclusion in log messages.
abstract  EndpointReference[] getEndpointReferences(AxisService service, java.lang.String ip)
          Get the endpoint references for this protocol endpoint.
 AbstractTransportListenerEx<?> getListener()
           
 AxisService getService()
           
 java.lang.String getServiceName()
          Get the name of the service to which messages received by this endpoint are pre-dispatched.
abstract  boolean loadConfiguration(ParameterInclude params)
          Configure the endpoint based on the provided parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolEndpoint

public ProtocolEndpoint()
Method Detail

getListener

public final AbstractTransportListenerEx<?> getListener()

getService

public final AxisService getService()

getServiceName

public final java.lang.String getServiceName()
Get the name of the service to which messages received by this endpoint are pre-dispatched.

Returns:
the name of the service, or null if message are not pre-dispatched

getConfigurationContext

protected final ConfigurationContext getConfigurationContext()
Get the Axis2 configuration context. This is a convenience method that can be used by subclasses to get the ConfigurationContext object from the listener.

Returns:
the configuration context

loadConfiguration

public abstract boolean loadConfiguration(ParameterInclude params)
                                   throws AxisFault
Configure the endpoint based on the provided parameters. If no relevant parameters are found, the implementation should return false. An exception should only be thrown if there is an error or inconsistency in the parameters.

Parameters:
params - The source of the parameters to configure the endpoint. If the parameters are defined on a service, this will be an AxisService instance.
Returns:
true if the parameters contained the required configuration information and the endpoint has been configured, false if the no configuration for the endpoint is present in the parameters
Throws:
AxisFault - if configuration information is present, but there is an error or inconsistency in the parameters

getEndpointReferences

public abstract EndpointReference[] getEndpointReferences(AxisService service,
                                                          java.lang.String ip)
                                                   throws AxisFault
Get the endpoint references for this protocol endpoint.

Parameters:
service - The service to build the EPR for. If getService() returns a non null value, then it has the same value as this parameter, which is never null.
ip - The host name or IP address of the local host. The implementation should use this information instead of InetAddress.getLocalHost(). The value of this parameter may be null, in which case the implementation should use Utils.getIpAddress( org.apache.axis2.engine.AxisConfiguration).
Returns:
an array of endpoint references
Throws:
AxisFault
See Also:
TransportListener.getEPRsForService(String, String)

getDescription

public java.lang.String getDescription()
Get a short description of this endpoint suitable for inclusion in log messages.

Returns:
a short description of the endpoint

createMessageContext

public MessageContext createMessageContext()
                                    throws AxisFault
Throws:
AxisFault


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.