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[/pass-by-value][?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) or invm://myservice/false?false (first false is pass-by-value value). 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
           
static java.lang.String PASS_BY_VALUE
           
static java.lang.String TEMPORARY_EPR
           
 
Fields inherited from class org.jboss.soa.esb.addressing.EPR
_logger
 
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()
           
 boolean getPassByValue()
           
 java.lang.String getServiceId()
           
 boolean isTemporaryEPR()
           
 void setLockstep(boolean lockstep)
           
 void setLockstepWaitTime(long waitTime)
           
 void setPassByValue(boolean val)
           
 void setServiceId(java.lang.String serviceId)
           
 void setTemporaryEPR(boolean temporary)
           
 java.lang.String toString()
           
static java.net.URI type()
           
 
Methods inherited from class org.jboss.soa.esb.addressing.EPR
equals, getAddr, getURI, hashCode, setAddr, setURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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

PASS_BY_VALUE

public static final java.lang.String PASS_BY_VALUE
See Also:
Constant Field Values

TEMPORARY_EPR

public static final java.lang.String TEMPORARY_EPR
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)

getPassByValue

public boolean getPassByValue()

setPassByValue

public void setPassByValue(boolean val)

isTemporaryEPR

public boolean isTemporaryEPR()

setTemporaryEPR

public void setTemporaryEPR(boolean temporary)

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