org.jboss.soa.esb.addressing.eprs
Class InVMEpr
java.lang.Object
org.jboss.soa.esb.addressing.EPR
org.jboss.soa.esb.addressing.eprs.InVMEpr
public class InVMEpr
- extends EPR
A helper class for using in-VM communication.
EPR: invm://servicename[?lockstep[#waittime]]
where lockstep can be either true or false and waittime is the lockstep wait
time in milliseconds. If lockstep is false then any value specified for
waittime will be ignored.
e.g.,
invm://myservice?true#20000 invm://myservice invm://myservice?false (same as
invm://myservice)
You can have a lockstep service, where the sender thread is tied to the one
that does the execution (equivalent to the sender thread doing the work
within the receiver), or non-lockstep, whereby the sender thread is decoupled
from the receiver and works as fast as it needs to in order to deliver
messages. This is roughly equivalent to CORBA POA threading policies. (Maybe
we'll implement it that way at some point in the future?)
- Author:
- marklittle
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_LOCKSTEP_WAIT_TIME
public static final long DEFAULT_LOCKSTEP_WAIT_TIME
- See Also:
- Constant Field Values
INVM_PROTOCOL
public static final java.lang.String INVM_PROTOCOL
- See Also:
- Constant Field Values
LOCKSTEP_ENDPOINT_TAG
public static final java.lang.String LOCKSTEP_ENDPOINT_TAG
- See Also:
- Constant Field Values
LOCKSTEP_WAIT_TIME_TAG
public static final java.lang.String LOCKSTEP_WAIT_TIME_TAG
- See Also:
- Constant Field Values
InVMEpr
public InVMEpr(EPR epr)
InVMEpr
public InVMEpr(EPR epr,
org.w3c.dom.Element header)
InVMEpr
public InVMEpr(java.net.URI uri)
throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException
getServiceId
public java.lang.String getServiceId()
setServiceId
public void setServiceId(java.lang.String serviceId)
getLockstep
public boolean getLockstep()
setLockstep
public void setLockstep(boolean lockstep)
getLockstepWaitTime
public long getLockstepWaitTime()
setLockstepWaitTime
public void setLockstepWaitTime(long waitTime)
toString
public java.lang.String toString()
- Overrides:
toString
in class EPR
createEncodedServiceId
public static java.lang.String createEncodedServiceId(java.lang.String catagory,
java.lang.String name)
- Create an encoded service ID from the supplied Service Cat and Name.
The result is a simple hex encoding of the concatenated strings and is
usable in the InVMEpr URI i.e. is uneffected by slashes etc in the
Cat and Service name strings.
- Parameters:
catagory
- The Service Category.name
- The Service name.
- Returns:
- Hex encoded string.
copy
public EPR copy()
- Description copied from class:
EPR
- Return a copy of this EPR.
- Overrides:
copy
in class EPR
type
public static java.net.URI type()