|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.nmr.core.ChannelImpl
public class ChannelImpl
The Channel implementation.
The channel uses an Executor (usually a thread pool)
to delegate task executions to.
| Constructor Summary | |
|---|---|
ChannelImpl(InternalEndpoint endpoint,
org.apache.servicemix.executors.Executor executor,
NMR nmr)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the channel, freeing up any resources (like sockets, threads etc). |
Exchange |
createExchange(Pattern pattern)
Creates a new exchange. |
void |
deliver(InternalExchange exchange)
Deliver an exchange to the endpoint using this channel |
protected void |
dispatch(InternalExchange exchange)
Dispatch the exchange to the NMR |
InternalEndpoint |
getEndpoint()
Access to the endpoint |
protected org.apache.servicemix.executors.Executor |
getExecutor()
Provide access to the underlying Executor |
NMR |
getNMR()
Access to the bus |
protected void |
handleFailure(InternalExchange exchange,
RuntimeException e,
boolean dispatch)
|
boolean |
isRunAsSubject()
Will the endpoint code be invoked on behalf of the 'in' message subject? |
boolean |
isShouldRunSynchronously()
|
protected void |
process(InternalExchange exchange)
Processes the exchange. |
void |
send(Exchange exchange)
An asynchronous invocation of the service |
boolean |
sendSync(Exchange exchange)
Synchronously send the exchange, blocking until the exchange is returned. |
boolean |
sendSync(Exchange exchange,
long timeout)
Synchronously send the exchange |
void |
setRunAsSubject(boolean runAsSubject)
Configure whether or not the endpoint will be invoked on behalf of the subject found on the in message or not. |
void |
setShouldRunSynchronously(boolean shouldRunSynchronously)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChannelImpl(InternalEndpoint endpoint,
org.apache.servicemix.executors.Executor executor,
NMR nmr)
| Method Detail |
|---|
public boolean isShouldRunSynchronously()
public void setShouldRunSynchronously(boolean shouldRunSynchronously)
public boolean isRunAsSubject()
public void setRunAsSubject(boolean runAsSubject)
false.
runAsSubject - public NMR getNMR()
getNMR in interface Channelpublic InternalEndpoint getEndpoint()
public Exchange createExchange(Pattern pattern)
createExchange in interface Channelpattern - specify the InOnly / InOut / RobustInOnly / RobustInOut
public void send(Exchange exchange)
send in interface Channelexchange - the exchange to sendpublic boolean sendSync(Exchange exchange)
sendSync in interface Channelexchange - the exchange to send
true if the exchange has been processed succesfully
public boolean sendSync(Exchange exchange,
long timeout)
sendSync in interface Channelexchange - the exchange to sendtimeout - time to wait in milliseconds
true if the exchange has been processed succesfullypublic void close()
close in interface Channelpublic void deliver(InternalExchange exchange)
deliver in interface InternalChannelexchange - the exchange to deliveryprotected void process(InternalExchange exchange)
exchange - the exchange to processprotected void dispatch(InternalExchange exchange)
exchange - the exchange to dispatch
protected void handleFailure(InternalExchange exchange,
RuntimeException e,
boolean dispatch)
protected final org.apache.servicemix.executors.Executor getExecutor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||