|
|||||||||
| Home >> All >> com >> flexstor >> common >> [ gateway overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.flexstor.common.gateway
Class Gateway

java.lang.Objectcom.flexstor.common.gateway.Gateway
- All Implemented Interfaces:
- com.flexstor.common.constants.EjbHomeInterfacesI
- Direct Known Subclasses:
- AdmGroupGateway, AdmGroupPersistGateway, AdmUserPersistGateway, ApplicationGateway, AssetPathGateway, AssetRoleListGateway, AssetsInProcessGateway, BucketGateway, CheckInGateway, CheckOutCheckInGateway, CheckOutGateway, CleanupGateway, ContextGateway, DisguiseBucketGateway, DisguiseFieldGateway, DisguiseGateway, DisplayBucketGateway, DisplayFieldGateway, DisplayGateway, DisplayLayoutGateway, EditGateway, EmailAddressGateway, FieldGateway, FileStorageGateway, FtpAddressGateway, GroupGateway, ImportRecordGateway, ImportSettingGateway, InitGateway, LookupGateway, LookupListGateway, MachineGateway, PrivAssetGateway, PrivilegeGateway, PropertyGateway, ReportTemplateGateway, RestrictiveWhereGateway, RoleGateway, SavedSearchGateway, SearchGateway, SearchResultGateway, SendSettingGateway, SequenceGateway, ServerListGateway, SettingsGateway, TransLogGateway, UserGateway, VirDeviceGateway, WorkspaceGateway
- public abstract class Gateway
- extends java.lang.Object
- implements com.flexstor.common.constants.EjbHomeInterfacesI
- extends java.lang.Object
Core class of the Server Gateway Framework
- Version:
- 3.0
| Nested Class Summary | |
private class |
Gateway.HeartbeatManager
Manages heartbeats for all instances of the server gateway framework. |
| Field Summary | |
protected static boolean |
bInitialized
True if the gateway framework has been initialized |
protected static boolean |
bLoadObjects
|
protected static boolean |
bSaveObjects
Debug objects |
protected static com.flexstor.common.gateway.engine.GatewayEngineI |
engine
Refrence to the current engine |
private static Gateway.HeartbeatManager |
heartbeat
|
private static long |
nBeatDuration
Manages gateway heartbeats. |
protected static com.flexstor.common.gateway.debug.GatewayDebugUtil |
util
|
| Constructor Summary | |
Gateway()
|
|
| Method Summary | |
void |
beginHeartbeats()
Starts sending heartbeats to the EJB server for the specified object. |
protected com.flexstor.common.gateway.exceptions.TransactionFailedException |
buildException(java.lang.Throwable e)
Reformats the given exception to a TransactionFailedException. |
protected com.flexstor.common.gateway.exceptions.TransactionFailedException |
buildException(java.lang.Throwable e,
java.lang.String sSourceModule,
java.lang.String sClassIdentifier)
Reformats the given exception to a TransactionFailedException. |
protected boolean |
canLoadObject()
Returns true if object loading is on. |
protected boolean |
canSaveObject()
Returns true if object saving is on. |
void |
dispose()
Cleans up the gateway. |
java.lang.String |
EBJObjectToString(com.flexstor.ejb.EjbObject o)
Converts an ROEJBObject reference to a String and limits it to 100 characters. |
static void |
enableDebugging(java.lang.String sBasePath,
boolean bSave,
boolean bLoad)
Enables debugging (serialization of objects to files). |
protected abstract com.flexstor.ejb.EjbObject |
getBeanObject()
Returns the instance of the current bean, or null if the bean has not been created. |
protected com.flexstor.ejb.EjbHome |
getHome()
Returns the home interface for the specified published name. |
protected abstract java.lang.String |
getHomeName()
Returns the name of the home interface. |
static boolean |
isInitalized()
Checks to see if the gateway framework has been properly initialized. |
protected java.lang.Object |
retrieveObject(java.lang.String sName)
Loads an object from a file. |
protected void |
shutdown()
Shuts down the gatway framework by stopping the heartbeat thread and closing all open JNDI contexts. |
protected void |
storeObject(java.lang.String sName,
java.lang.Object o)
Stores an object to a file. |
protected void |
storeObject(java.lang.String sName,
java.lang.Object o,
boolean bUpdate)
Stores an object to a file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
engine
protected static com.flexstor.common.gateway.engine.GatewayEngineI engine
- Refrence to the current engine
bInitialized
protected static boolean bInitialized
- True if the gateway framework has been initialized
bSaveObjects
protected static boolean bSaveObjects
- Debug objects
bLoadObjects
protected static boolean bLoadObjects
util
protected static com.flexstor.common.gateway.debug.GatewayDebugUtil util
nBeatDuration
private static long nBeatDuration
- Manages gateway heartbeats.
heartbeat
private static Gateway.HeartbeatManager heartbeat
| Constructor Detail |
Gateway
public Gateway()
| Method Detail |
getHomeName
protected abstract java.lang.String getHomeName()
- Returns the name of the home interface.
getBeanObject
protected abstract com.flexstor.ejb.EjbObject getBeanObject()
- Returns the instance of the current bean, or null if the bean has not been created.
isInitalized
public static boolean isInitalized()
- Checks to see if the gateway framework has been properly initialized.
getHome
protected com.flexstor.ejb.EjbHome getHome() throws java.lang.Exception
- Returns the home interface for the specified published name.
buildException
protected com.flexstor.common.gateway.exceptions.TransactionFailedException buildException(java.lang.Throwable e)
- Reformats the given exception to a TransactionFailedException.
This method also performs error logging, so it is important that this method be called
whenever an incoming exception occurs.
buildException
protected com.flexstor.common.gateway.exceptions.TransactionFailedException buildException(java.lang.Throwable e, java.lang.String sSourceModule, java.lang.String sClassIdentifier)
- Reformats the given exception to a TransactionFailedException.
This method also performs error logging, so it is important that this method be called
whenever an incoming exception occurs.
shutdown
protected void shutdown()
- Shuts down the gatway framework by stopping the heartbeat thread and closing all open JNDI contexts.
dispose
public void dispose()
- Cleans up the gateway.
NOTE: This method MUST be called to stop heartbeats from going to the EJB if beginHeartbeats() has been called.
NOTE: This methos MUST be called if you wish the server to immediately cleanup (passivate) this EJB.
enableDebugging
public static void enableDebugging(java.lang.String sBasePath, boolean bSave, boolean bLoad) throws com.flexstor.common.gateway.exceptions.GatewayInitException
- Enables debugging (serialization of objects to files).
canSaveObject
protected boolean canSaveObject()
- Returns true if object saving is on.
canLoadObject
protected boolean canLoadObject()
- Returns true if object loading is on.
storeObject
protected void storeObject(java.lang.String sName, java.lang.Object o, boolean bUpdate) throws java.lang.Throwable
- Stores an object to a file.
storeObject
protected void storeObject(java.lang.String sName, java.lang.Object o) throws java.lang.Throwable
- Stores an object to a file.
retrieveObject
protected java.lang.Object retrieveObject(java.lang.String sName) throws java.lang.Throwable
- Loads an object from a file.
EBJObjectToString
public java.lang.String EBJObjectToString(com.flexstor.ejb.EjbObject o)
- Converts an ROEJBObject reference to a String and limits it to 100 characters.
beginHeartbeats
public void beginHeartbeats()
- Starts sending heartbeats to the EJB server for the specified object. Call dispose()
to stop the heartbeats for this bean.
This method does not cause the heartbeat to be sent right away. In the worst case it will take the
full heartbeat duration (nBeatDuration) before a heartbeat is sent.
|
|||||||||
| Home >> All >> com >> flexstor >> common >> [ gateway overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.flexstor.common.gateway.Gateway