Package com.swiftmq.swiftlet
Class Swiftlet
- java.lang.Object
-
- com.swiftmq.swiftlet.Swiftlet
-
- Direct Known Subclasses:
AMQPSwiftlet
,AuthenticationSwiftlet
,DeploySwiftlet
,JMSSwiftlet
,JNDISwiftlet
,LogSwiftlet
,MgmtSwiftlet
,MQTTSwiftlet
,NetworkSwiftlet
,QueueManager
,RoutingSwiftlet
,SchedulerSwiftlet
,StoreSwiftlet
,StreamsSwiftlet
,ThreadpoolSwiftlet
,TimerSwiftlet
,TopicManager
,TraceSwiftlet
,XAResourceManagerSwiftlet
public abstract class Swiftlet extends java.lang.Object
Swiftlets are components of a SwiftMQ router and are under control of the SwiftletManager.
Implementing classes overwrite thestartup
andshutdown
method.
A Swiftlet is instantiated from the SwiftletManager. All Kernel Swiftlets are sharing one class loader, and every Extension Swiftlet has his own class loader.- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
- See Also:
SwiftletManager
-
-
Field Summary
Fields Modifier and Type Field Description static int
STATE_ACTIVE
static int
STATE_INACTIVE
static int
STATE_STANDBY
-
Constructor Summary
Constructors Constructor Description Swiftlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Returns the name of the Swiftletlong
getStartupTime()
Returns the Swiftlet startup timeint
getState()
Returns the current swiftlet stateboolean
isSnapshotAvailable()
Returns whether this Swiftlet provides Snapshotsprotected void
resume()
Resume this Swiftlet after it has been in standby mode.protected void
setStartupTime(long startupTime)
Set the startup time.protected abstract void
shutdown()
Stop this Swiftlet.protected void
standby(Configuration config)
Start this Swiftlet in standby mode.protected abstract void
startup(Configuration config)
Start this Swiftlet.
-
-
-
Field Detail
-
STATE_ACTIVE
public static final int STATE_ACTIVE
- See Also:
- Constant Field Values
-
STATE_INACTIVE
public static final int STATE_INACTIVE
- See Also:
- Constant Field Values
-
STATE_STANDBY
public static final int STATE_STANDBY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the Swiftlet- Returns:
- swiftlet name
-
getState
public int getState()
Returns the current swiftlet state- Returns:
- current state
-
getStartupTime
public long getStartupTime()
Returns the Swiftlet startup time- Returns:
- startup time.
-
setStartupTime
protected void setStartupTime(long startupTime)
Set the startup time. Called from the SwiftletManager.- Parameters:
startupTime
- startup time.
-
isSnapshotAvailable
public boolean isSnapshotAvailable()
Returns whether this Swiftlet provides Snapshots- Returns:
- snapshot available.
-
startup
protected abstract void startup(Configuration config) throws SwiftletException
Start this Swiftlet. Called from the SwiftletManager during router start. The Swiftlet configuration is passed as parameter.- Parameters:
config
- Swiftlet configuration.- Throws:
SwiftletException
- on error during startup.
-
standby
protected void standby(Configuration config) throws SwiftletException
Start this Swiftlet in standby mode. This method must be implemented from Kernel Swiftlets only.- Parameters:
config
- Swiftlet configuration.- Throws:
SwiftletException
- on error during startup.
-
resume
protected void resume() throws SwiftletException
Resume this Swiftlet after it has been in standby mode. The Swiftlet changes to active. This method must be implemented from Kernel Swiftlets only.- Throws:
SwiftletException
- on error during startup.
-
shutdown
protected abstract void shutdown() throws SwiftletException
Stop this Swiftlet. Called from the SwiftletManager during router shutdown.- Throws:
SwiftletException
- on error during shutdown.
-
-