org.jboss.soa.esb.addressing.eprs
Class InVMEpr

java.lang.Object
  extended by org.jboss.soa.esb.addressing.EPR
      extended by 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

Field Summary
static long DEFAULT_LOCKSTEP_WAIT_TIME
           
static java.lang.String INVM_PROTOCOL
           
static java.lang.String LOCKSTEP_ENDPOINT_TAG
           
static java.lang.String LOCKSTEP_WAIT_TIME_TAG
           
 
Constructor Summary
InVMEpr(EPR epr)
           
InVMEpr(EPR epr, org.w3c.dom.Element header)
           
InVMEpr(java.net.URI uri)
           
 
Method Summary
 EPR copy()
          Return a copy of this EPR.
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.
 boolean getLockstep()
           
 long getLockstepWaitTime()
           
 java.lang.String getServiceId()
           
 void setLockstep(boolean lockstep)
           
 void setLockstepWaitTime(long waitTime)
           
 void setServiceId(java.lang.String serviceId)
           
 java.lang.String toString()
           
static java.net.URI type()
           
 
Methods inherited from class org.jboss.soa.esb.addressing.EPR
equals, getAddr, getURI, setAddr, setURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

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
Method Detail

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()