net.agmodel.chizuBean
Class ChizuBrokerBean

java.lang.Object
  |
  +--net.agmodel.utilBean.ServerBean
        |
        +--net.agmodel.chizuBean.ChizuBrokerBean
All Implemented Interfaces:
Serializable

public class ChizuBrokerBean
extends ServerBean

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class net.agmodel.utilBean.ServerBean
ServerBean.ConnectThreadEJBHTTP, ServerBean.ConnectThreadHTTP, ServerBean.ConnectThreadRMIHTTP
 
Field Summary
 
Fields inherited from class net.agmodel.utilBean.ServerBean
serverHTTP, serverRMI, sessionID
 
Constructor Summary
ChizuBrokerBean()
           
 
Method Summary
protected  void disconnect()
          If the services is a Server, then connects and returns a sessionID.
protected  ServerHTTP getHTTPObject()
           
protected  void getRMIConnection()
          If the services is a Server, then connects and returns a sessionID.
 String getRMIName()
          Return the name the server registers itself by in RMIRegistry.
protected  Thread getServiceFinderThread()
          Returns a thread object which can find a reference to the service, and in the case of Servers establish a connection to the broker, through whichever mechanisms are available.
protected  boolean isEJB()
           
protected  boolean isStateful()
           
protected  Remote narrowEJBHomeReference(Object obj)
           
protected  void setUpBean()
           
 
Methods inherited from class net.agmodel.utilBean.ServerBean
addServiceBeanListener, createEJB, finalize, fireServiceBeanEvent, getClientInfo, getHTTPHost, getHTTPHostParamName, getHTTPPort, getHTTPPortParamName, getLanguage, getRMIHost, getRMIHostParamName, isLive, removeServiceBeanListener, setClientInfo, setHTTPHost, setHTTPPort, setLanguage, setLive, setRMIHost
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChizuBrokerBean

public ChizuBrokerBean()
Method Detail

getHTTPObject

protected ServerHTTP getHTTPObject()
                            throws GeneralException
Specified by:
getHTTPObject in class ServerBean
GeneralException

setUpBean

protected void setUpBean()
Overrides:
setUpBean in class ServerBean

getRMIName

public String getRMIName()
Description copied from class: ServerBean
Return the name the server registers itself by in RMIRegistry.
Also used as the stem of applet parameters.

Specified by:
getRMIName in class ServerBean
Returns:
a short identifier for the server, usually stored as a constant in the corresponding RMI interface.

getServiceFinderThread

protected Thread getServiceFinderThread()
Description copied from class: ServerBean
Returns a thread object which can find a reference to the service, and in the case of Servers establish a connection to the broker, through whichever mechanisms are available.
This thread must call fireServerBeanEvent when the connection is established.
This method is called by setLive(true).
A thread is used, because searching for the way to talk to a broker can take a while, and the application should not block while this is happening. It allows multiple beans to find brokers at the same time.

Specified by:
getServiceFinderThread in class ServerBean
Returns:
a thread, not yet started.

getRMIConnection

protected void getRMIConnection()
                         throws GeneralException,
                                RemoteException
If the services is a Server, then connects and returns a sessionID.
Otherwise does nothing.
This method is normally called, if necessary, by the connect thread

Specified by:
getRMIConnection in class ServerBean
GeneralException
RemoteException

disconnect

protected void disconnect()
If the services is a Server, then connects and returns a sessionID. Otherwise does nothing. This method is called by setLive(false)

Specified by:
disconnect in class ServerBean

isStateful

protected boolean isStateful()
Specified by:
isStateful in class ServerBean

isEJB

protected boolean isEJB()
Specified by:
isEJB in class ServerBean

narrowEJBHomeReference

protected Remote narrowEJBHomeReference(Object obj)