Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mortbay.j2ee.session
Class JGMedium  view JGMedium download JGMedium.java

java.lang.Object
  extended byorg.mortbay.j2ee.session.JGMedium
All Implemented Interfaces:
java.lang.Cloneable, Medium

public class JGMedium
extends java.lang.Object
implements Medium

A Medium through which notifications are distributed...

Version:
1.0

Field Summary
protected  Channel _channel
           
protected  RpcDispatcher _dispatcher
           
protected  java.lang.String _distributionMode
           
protected  int _distributionModeInternal
           
protected  int _distributionTimeOut
           
protected  java.util.Map _interceptors
           
protected  org.apache.log4j.Category _log
           
protected  Manager _manager
           
protected  java.lang.String _protocolStack
           
private static java.lang.ThreadLocal _replicating
           
protected  int _retrievalTimeOut
           
protected  java.lang.String _subClusterName
           
 
Constructor Summary
JGMedium()
           
 
Method Summary
 java.lang.Object clone()
          This method may be called to create a new copy of the Object.
 void deregister(java.lang.String id)
           
 void destroy()
           
 void dispatch(java.lang.String id, java.lang.String methodName, java.lang.Class[] argClasses, java.lang.Object[] argInstances)
           
protected  java.lang.String getChannelName()
           
protected  java.lang.String getContextPath()
           
 java.lang.String getDistributionMode()
           
protected  int getDistributionModeInternal()
           
 int getDistributionTimeOut()
           
 Manager getManager()
           
 java.lang.String getProtocolStack()
           
static boolean getReplicating()
           
 int getRetrievalTimeOut()
           
 byte[] getState()
           
 java.lang.String getSubClusterName()
           
 void receive(Message msg)
           
 void register(java.lang.String id, java.lang.Object o)
           
 void send(java.lang.String id, java.lang.String methodName, java.lang.Class[] argClasses, java.lang.Object[] argInstances)
           
 void setDistributionMode(java.lang.String distributionMode)
           
protected  void setDistributionModeInternal(java.lang.String distributionMode)
           
 void setDistributionTimeOut(int distributionTimeOut)
           
 void setManager(Manager manager)
           
 void setProtocolStack(java.lang.String protocolStack)
           
static void setReplicating(boolean replicating)
           
 void setRetrievalTimeOut(int retrievalTimeOut)
           
 void setState(byte[] b)
           
 void setSubClusterName(java.lang.String subClusterName)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_replicating

private static final java.lang.ThreadLocal _replicating

_log

protected final org.apache.log4j.Category _log

_protocolStack

protected java.lang.String _protocolStack

_subClusterName

protected java.lang.String _subClusterName

_retrievalTimeOut

protected int _retrievalTimeOut

_distributionModeInternal

protected int _distributionModeInternal

_distributionMode

protected java.lang.String _distributionMode

_distributionTimeOut

protected int _distributionTimeOut

_channel

protected Channel _channel

_dispatcher

protected RpcDispatcher _dispatcher

_manager

protected Manager _manager

_interceptors

protected java.util.Map _interceptors
Constructor Detail

JGMedium

public JGMedium()
Method Detail

getReplicating

public static boolean getReplicating()

setReplicating

public static void setReplicating(boolean replicating)

getProtocolStack

public java.lang.String getProtocolStack()

setProtocolStack

public void setProtocolStack(java.lang.String protocolStack)

getSubClusterName

public java.lang.String getSubClusterName()

setSubClusterName

public void setSubClusterName(java.lang.String subClusterName)

getRetrievalTimeOut

public int getRetrievalTimeOut()

setRetrievalTimeOut

public void setRetrievalTimeOut(int retrievalTimeOut)

getDistributionModeInternal

protected int getDistributionModeInternal()

setDistributionModeInternal

protected void setDistributionModeInternal(java.lang.String distributionMode)

getDistributionMode

public java.lang.String getDistributionMode()

setDistributionMode

public void setDistributionMode(java.lang.String distributionMode)

getDistributionTimeOut

public int getDistributionTimeOut()

setDistributionTimeOut

public void setDistributionTimeOut(int distributionTimeOut)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: java.lang.Object
This method may be called to create a new copy of the Object. The typical behavior is as follows:
  • o == o.clone() is false
  • o.getClass() == o.clone().getClass() is true
  • o.equals(o) is true

However, these are not strict requirements, and may be violated if necessary. Of the three requirements, the last is the most commonly violated, particularly if the subclass does not override Object.equals(Object)>Object.equals(Object) 55 .

If the Object you call clone() on does not implement java.lang.Cloneable (which is a placeholder interface), then a CloneNotSupportedException is thrown. Notice that Object does not implement Cloneable; this method exists as a convenience for subclasses that do.

Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.

All array types implement Cloneable, and override this method as follows (it should never fail):

 public Object clone()
 {
   try
     {
       super.clone();
     }
   catch (CloneNotSupportedException e)
     {
       throw new InternalError(e.getMessage());
     }
 }
 

Specified by:
clone in interface Medium

setManager

public void setManager(Manager manager)
Specified by:
setManager in interface Medium

getManager

public Manager getManager()

getContextPath

protected java.lang.String getContextPath()

getChannelName

protected java.lang.String getChannelName()

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface Medium

stop

public void stop()
Specified by:
stop in interface Medium

destroy

public void destroy()
Specified by:
destroy in interface Medium

send

public void send(java.lang.String id,
                 java.lang.String methodName,
                 java.lang.Class[] argClasses,
                 java.lang.Object[] argInstances)
Specified by:
send in interface Medium

dispatch

public void dispatch(java.lang.String id,
                     java.lang.String methodName,
                     java.lang.Class[] argClasses,
                     java.lang.Object[] argInstances)

register

public void register(java.lang.String id,
                     java.lang.Object o)
Specified by:
register in interface Medium

deregister

public void deregister(java.lang.String id)
Specified by:
deregister in interface Medium

receive

public void receive(Message msg)

getState

public byte[] getState()

setState

public void setState(byte[] b)