org.mule.impl
Class EndpointList

java.lang.Object
  extended byorg.mule.impl.EndpointList

public class EndpointList
extends java.lang.Object

EndpointList encapsulates two lists of ProviderDescriptors; send endpoints and receive endpoints. It also provides helper methods to query manipulate and maintain state of the lists.

Version:
$Revision: 1.1.1.1 $
Author:
Ross Mason

Constructor Summary
EndpointList()
          Default constructor
 
Method Summary
 void add(UMOImmutableEndpoint endpoint)
          Add an endpoint to the list
 void add(UMOImmutableEndpoint endpoint, boolean readOnly)
          Add an endpoint to the list
 void addProviderList(EndpointList list)
           
protected  void addReceiveProvider(UMOImmutableEndpoint endpoint, boolean readOnly)
          Adds a receive endpoint to the list
 void addSendProvider(UMOImmutableEndpoint endpoint, boolean readOnly)
          Adds a send endpoint to the list
 void clear()
           
 UMOEndpoint get(java.lang.String name)
          Returns an endpoint with the given name
 java.util.Map getAll()
          This methods returns an unmodifiable map of all the the endpoints registered in this list
 UMOImmutableEndpoint getDefaultReceiveProvider()
          Returns the default Receive Provider in the list.
 UMOImmutableEndpoint getDefaultSendProvider()
          Returns the default Send Provider in the list.
 UMOEndpoint getReceiveProvider(java.lang.String name)
          Retrieves a receive endpoint with the given name
 UMOImmutableEndpoint[] getReceiveProvidersByEndpoint(java.lang.String endpoint, boolean exactMatch)
          Returns a list of receive endpoints that use the given endpointUri
 UMOImmutableEndpoint[] getReceiveProvidersByProtocol(java.lang.String protocol)
          Returns a list of receive endpoints that use the given protocol
 int getReceiveProvidersSize()
          Returns the total number of receive endpoints
 java.util.Iterator getReceiverNames()
          Returns an Iterator of receive endpoint names in the endpoint list
 java.util.Iterator getSenderNames()
          Returns an Iterator of send endpoint names in the endpoint list
 UMOEndpoint getSendProvider(java.lang.String name)
          Retrieves a send endpoint with the given name
 MuleEndpoint[] getSendProvidersByEndpoint(java.lang.String endpoint, boolean exactMatch)
          Returns a list of send endpoints that use the given protocol
 MuleEndpoint[] getSendProvidersByProtocol(java.lang.String protocol)
          Returns a list of send endpoints that use the given protocol
 int getSendProvidersSize()
          Returns the total number of send endpoints
 int getTotalSize()
          Gets the total number of all endpoints in the list
 void remove(UMOImmutableEndpoint endpoint)
          Removes an endpoint from the list
 void setDefaultReceiveProvider(UMOImmutableEndpoint endpoint)
          Sets the specified endpoint to be the default in the list
 void setDefaultReceiveProvider(UMOImmutableEndpoint endpoint, boolean readOnly)
          Sets the specified endpoint to be the default in the list
 void setDefaultSendProvider(UMOImmutableEndpoint endpoint)
          Sets the specified endpoint to be the default in the list
 void setDefaultSendProvider(UMOImmutableEndpoint endpoint, boolean readOnly)
          Sets the specified endpoint to be the default in the list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointList

public EndpointList()
Default constructor

Method Detail

getReceiverNames

public java.util.Iterator getReceiverNames()
Returns an Iterator of receive endpoint names in the endpoint list

Returns:
iterator of receive endpoint names

getSenderNames

public java.util.Iterator getSenderNames()
Returns an Iterator of send endpoint names in the endpoint list

Returns:
iterator of send endpoint names

getReceiveProvider

public UMOEndpoint getReceiveProvider(java.lang.String name)
Retrieves a receive endpoint with the given name

Parameters:
name - Name of the endpoint to return
Returns:
the endpoint or null if an endpoint wasn't found

getSendProvider

public UMOEndpoint getSendProvider(java.lang.String name)
Retrieves a send endpoint with the given name

Parameters:
name - Name of the endpoint to return
Returns:
the endpoint or null if an endpoint wasn't found

addSendProvider

public void addSendProvider(UMOImmutableEndpoint endpoint,
                            boolean readOnly)
Adds a send endpoint to the list

Parameters:
endpoint - the endpoint to add
readOnly - whether the endpoint should be read-only

addProviderList

public void addProviderList(EndpointList list)

addReceiveProvider

protected void addReceiveProvider(UMOImmutableEndpoint endpoint,
                                  boolean readOnly)
Adds a receive endpoint to the list

Parameters:
endpoint - the endpoint to add
readOnly - whether the endpoint should be read-only

setDefaultSendProvider

public void setDefaultSendProvider(UMOImmutableEndpoint endpoint)
                            throws MuleException
Sets the specified endpoint to be the default in the list

Parameters:
endpoint - the default endpoint
Throws:
MuleException - if the endpoint is null or is not of the correct type i.e. a receiver not a sender

setDefaultSendProvider

public void setDefaultSendProvider(UMOImmutableEndpoint endpoint,
                                   boolean readOnly)
                            throws MuleException
Sets the specified endpoint to be the default in the list

Parameters:
endpoint - the default endpoint
readOnly - Whether the endpoint should be made read-only
Throws:
MuleException - if the endpoint is null or is not of the correct type i.e. a receiver not a sender

setDefaultReceiveProvider

public void setDefaultReceiveProvider(UMOImmutableEndpoint endpoint)
                               throws MuleException
Sets the specified endpoint to be the default in the list

Parameters:
endpoint - the default endpoint
Throws:
MuleException - if the endpoint is null or is not of the correct type i.e. a sender not a receiver

setDefaultReceiveProvider

public void setDefaultReceiveProvider(UMOImmutableEndpoint endpoint,
                                      boolean readOnly)
                               throws MuleException
Sets the specified endpoint to be the default in the list

Parameters:
endpoint - the default endpoint
readOnly - Whether the endpoint should be made read-only
Throws:
MuleException - if the endpoint is null or is not of the correct type i.e. a sender not a receiver

getDefaultReceiveProvider

public UMOImmutableEndpoint getDefaultReceiveProvider()
Returns the default Receive Provider in the list. If no default has been specified, the first receive endpoint added will be used

Returns:
the the default receive endpoint

getDefaultSendProvider

public UMOImmutableEndpoint getDefaultSendProvider()
Returns the default Send Provider in the list. If no default has been specified, the first send endpoint added will be used

Returns:
the the default send endpoint

getSendProvidersSize

public int getSendProvidersSize()
Returns the total number of send endpoints

Returns:
the total number of send endpoints

getReceiveProvidersSize

public int getReceiveProvidersSize()
Returns the total number of receive endpoints

Returns:
the total number of receive endpoints

add

public void add(UMOImmutableEndpoint endpoint)
Add an endpoint to the list

Parameters:
endpoint - the proivder to add

add

public void add(UMOImmutableEndpoint endpoint,
                boolean readOnly)
Add an endpoint to the list

Parameters:
endpoint - the proivder to add
readOnly - Whether the proivder should be made read-only

get

public UMOEndpoint get(java.lang.String name)
Returns an endpoint with the given name

Parameters:
name - the name of the proivder to return
Returns:
the proivder or null if an endpoint with the given name doesn't exist

remove

public void remove(UMOImmutableEndpoint endpoint)
Removes an endpoint from the list

Parameters:
endpoint - the proivder to remove

getTotalSize

public int getTotalSize()
Gets the total number of all endpoints in the list

Returns:
the total number of all endpoints in the list

getReceiveProvidersByProtocol

public UMOImmutableEndpoint[] getReceiveProvidersByProtocol(java.lang.String protocol)
Returns a list of receive endpoints that use the given protocol

Parameters:
protocol - the protocol name to select the endpoints with
Returns:
a list of endpoints. If there are no endpoints registered with the specified protocol an empty list is returned.

getSendProvidersByProtocol

public MuleEndpoint[] getSendProvidersByProtocol(java.lang.String protocol)
Returns a list of send endpoints that use the given protocol

Parameters:
protocol - the protocol name to select the endpoints with
Returns:
a list of endpoints. If there are no endpoints registered with the specified protocol an empty list is returned.

getReceiveProvidersByEndpoint

public UMOImmutableEndpoint[] getReceiveProvidersByEndpoint(java.lang.String endpoint,
                                                            boolean exactMatch)
Returns a list of receive endpoints that use the given endpointUri

Parameters:
endpoint - the endpointUri to select the endpoints with
exactMatch - determines if wildcard matching should be used
Returns:
a list of endpoints. If there are no endpoints registered with the specified protocol an empty list is returned.

getSendProvidersByEndpoint

public MuleEndpoint[] getSendProvidersByEndpoint(java.lang.String endpoint,
                                                 boolean exactMatch)
Returns a list of send endpoints that use the given protocol

Parameters:
endpoint - the endpointUri to select the endpoints with
exactMatch - determines if wildcard matching should be used
Returns:
a list of endpoints. If there are no endpoints registered with the specified protocol an empty list is returned.

clear

public void clear()

getAll

public java.util.Map getAll()
This methods returns an unmodifiable map of all the the endpoints registered in this list

Returns:


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.