public class Middleware
extends java.lang.Object
com.eibus.transport.ITransportProvider
,
Message
,
MessageListener
,
com.eibus.transport.URI
Modifier and Type | Method and Description |
---|---|
IRouting |
_getRoutingInstance(Target oTarget) |
static boolean |
_isCurrentThreadTransactional()
Returns true if the message current thread is handling a message that was received on a transactional transport.
|
void |
_onProblemClear(IManagedComponent managedComponent,
IProblemDefinition problemDefinition,
ILocalizableString message,
java.lang.Object[] arguments) |
void |
_onProblemRaise(IManagedComponent managedComponent,
IProblemDefinition problemDefinition,
ILocalizableString message,
java.lang.Object[] arguments) |
void |
close()
Close the connections to the Cordys ESB
|
void |
createManagedComponent(IManagedComponent parentComponent) |
void |
createManagedComponent(IManagedComponent parentComponent,
java.lang.String name,
ILocalizableString description) |
void |
createManagedComponent(IManagedComponent parentComponent,
java.lang.String name,
java.lang.String description)
Deprecated.
Use the localizable alternative instead.
|
java.lang.String |
getAddress()
Returns the first URI of any of the inbound queues.
|
java.lang.String[] |
getAddresses()
Retrieves an array of all URIs for which the Middleware object has inbound queues (i.e., on which it can receive
messages).
|
LDAPDirectory |
getDirectory()
Returns the proxy to the Directory Service.
|
static Middleware |
getInstance(java.lang.String name)
Returns the middleware instance with the specified name, or null if it does not exist.
|
static Middleware |
getInstance(java.lang.String name,
MessageListener listener,
LDAPDirectory directory)
Create or get a Middleware abstraction object.
|
static Middleware |
getInstance(java.lang.String name,
MessageListener listener,
LDAPDirectory directory,
int threadMultiplier) |
MessageListener |
getListener() |
int |
getMaxConcurrentWorkers() |
static java.util.Enumeration<java.lang.String> |
getMiddlewareNames()
Returns an Enumeration of the currently created Middleware instances.
|
java.lang.String |
getName()
Returns the name of this Middleware object.
|
java.lang.String |
getNonTransactionalInboundURI()
Returns the first URI of any of the NonTransactionalInboundURI
|
java.lang.String[] |
getNonTransactionalInboundURIs()
Deprecated.
|
java.lang.String |
getTransactionalInboundURI()
Returns the first URI of any of the TransactionalInboundURI
|
java.lang.String[] |
getTransactionalInboundURIs()
Deprecated.
|
long |
getWorkerTimeout() |
static boolean |
isAuthenticated() |
boolean |
isClosed() |
boolean |
isOpen() |
boolean |
isStopAccepting() |
void |
open()
Opens the Middleware object, i.e., from now on, incoming SOAP Messages can be expected.
|
void |
send(Message message)
Sends the Message object to any of the targets specified inside of it.
|
void |
send(Message message,
MessageOptions messageOptions) |
void |
send(java.lang.String[] targets,
Message message)
Deprecated.
|
void |
send(java.lang.String[] targets,
Message message,
MessageOptions messageOptions)
Deprecated.
|
static void |
setCredentials(java.lang.String userName,
java.lang.String passWord)
Deprecated.
|
void |
stopAcceptingMessages()
This method stops accepting new messages but doesn't stop the consuming of new messages.
|
public static Middleware getInstance(java.lang.String name, MessageListener listener, LDAPDirectory directory) throws ExceptionGroup, DirectoryException
name
- The name for which to connect to the Middleware.listener
- The callback object that will be called when a Message comes in from the Middleware.directory
- The directory proxy used to retrieve directory information.LDAPException
- If a failure happened in the communication with the LDAP serverExceptionGroup
- If no InboundQueues could be created for any of the URIs listed for the entry to be opened.DirectoryException
public static Middleware getInstance(java.lang.String name, MessageListener listener, LDAPDirectory directory, int threadMultiplier) throws ExceptionGroup, DirectoryException
ExceptionGroup
DirectoryException
public static Middleware getInstance(java.lang.String name)
public static java.util.Enumeration<java.lang.String> getMiddlewareNames()
public int getMaxConcurrentWorkers()
public void createManagedComponent(IManagedComponent parentComponent)
@Deprecated public void createManagedComponent(IManagedComponent parentComponent, java.lang.String name, java.lang.String description)
parentComponent
- name
- description
- public void createManagedComponent(IManagedComponent parentComponent, java.lang.String name, ILocalizableString description)
public void _onProblemRaise(IManagedComponent managedComponent, IProblemDefinition problemDefinition, ILocalizableString message, java.lang.Object[] arguments)
public void _onProblemClear(IManagedComponent managedComponent, IProblemDefinition problemDefinition, ILocalizableString message, java.lang.Object[] arguments)
public void stopAcceptingMessages()
public boolean isStopAccepting()
public java.lang.String getName()
public LDAPDirectory getDirectory()
@Deprecated public java.lang.String[] getTransactionalInboundURIs()
@Deprecated public java.lang.String[] getNonTransactionalInboundURIs()
public java.lang.String getTransactionalInboundURI()
public java.lang.String getNonTransactionalInboundURI()
public java.lang.String[] getAddresses()
public java.lang.String getAddress()
public void open()
java.lang.IllegalStateException
- if close() method has been called on the middleware object.public boolean isOpen()
public void close()
public boolean isClosed()
@Deprecated public void send(java.lang.String[] targets, Message message) throws ExceptionGroup
ExceptionGroup
@Deprecated public void send(java.lang.String[] targets, Message message, MessageOptions messageOptions) throws ExceptionGroup
ExceptionGroup
public void send(Message message, MessageOptions messageOptions) throws ExceptionGroup
ExceptionGroup
public void send(Message message) throws ExceptionGroup
LDAPDirectory.getURIs(target)
is called. The message will be sent to the first one of all possible
uris that can be retrieved this way and for which a middleware connection can be found that actually sends the
message. If the message cannot be sent to any of the supposed targets, every exception that occured will be packed
in the ExceptionGroup that is thrown.ExceptionGroup
- contains all the exceptions that occured while trying to send the messagepublic IRouting _getRoutingInstance(Target oTarget)
@Deprecated public static void setCredentials(java.lang.String userName, java.lang.String passWord) throws CredentialsFailedException
CredentialsFailedException
public static boolean isAuthenticated()
public static boolean _isCurrentThreadTransactional()
public MessageListener getListener()
public long getWorkerTimeout()