|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.aps.jca.cas.ServerContext
com.cosylab.epics.caj.cas.CAJServerContext
public class CAJServerContext
Implementation of CAJ JCA Context.
| Field Summary | |
|---|---|
protected CASAcceptor |
acceptor
CAS acceptor (accepts CA virtual circuit). |
protected boolean |
autoBeaconAddressList
Define whether or not the network interfaces should be discovered at runtime. |
protected java.lang.String |
beaconAddressList
A space-separated list of broadcast address which to send beacons. |
protected BeaconEmitter |
beaconEmitter
Beacon emitter.. |
protected float |
beaconPeriod
Period in second between two beacon signals. |
protected int |
beaconPort
Port number for the repeater to listen to. |
protected BroadcastTransport |
broadcastTransport
Broadcast transport needed for channel searches. |
protected CachedByteBufferAllocator |
cachedBufferAllocator
Cached byte buffer allocator. |
static java.lang.String |
CAJ_SINGLE_THREADED_MODEL
String value of the JVM property key to turn on single threaded model. |
protected java.util.ArrayList |
contextExceptionListeners
List of context exception listeners. |
protected java.util.ArrayList |
contextMessageListeners
List of context message listeners. |
protected java.lang.String |
ignoreAddressList
A space-separated list of address from which to ignore name resolution requests. |
protected LeaderFollowersThreadPool |
leaderFollowersThreadPool
Leader/followers thread pool. |
protected java.util.logging.Logger |
logger
Context logger. |
protected int |
maxArrayBytes
Length in bytes of the maximum array size that may pass through CA. |
protected Reactor |
reactor
Reactor. |
protected java.lang.Object |
runLock
Run lock. |
protected gov.aps.jca.cas.Server |
server
Server. |
protected int |
serverPort
Port number for the server to listen to. |
protected Timer |
timer
Timer. |
protected CATransportRegistry |
transportRegistry
CA transport (virtual circuit) registry. |
static gov.aps.jca.Version |
VERSION
Version. |
| Constructor Summary | |
|---|---|
CAJServerContext()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addContextExceptionListener(gov.aps.jca.event.ContextExceptionListener l)
|
void |
addContextMessageListener(gov.aps.jca.event.ContextMessageListener l)
|
protected void |
checkState()
Check context state and tries to establish necessary state. |
void |
configure(gov.aps.jca.configuration.Configuration configuration)
|
void |
destroy()
|
int |
generateChannelSID()
Generate channel SID. |
java.lang.String |
getBeaconAddressList()
Get beacon address list. |
float |
getBeaconPeriod()
Get beacon period (in seconds). |
int |
getBeaconPort()
Get beacon port. |
int |
getBroadcastPort()
Get broadcast port. |
BroadcastTransport |
getBroadcastTransport()
Broadcast transport. |
CachedByteBufferAllocator |
getCachedBufferAllocator()
Get cached byte allocator. |
gov.aps.jca.event.ContextExceptionListener[] |
getContextExceptionListeners()
|
gov.aps.jca.event.ContextMessageListener[] |
getContextMessageListeners()
|
java.lang.String |
getIgnoreAddressList()
Get ignore search address list. |
int |
getLastReceivedSequenceNumber(int seqNo)
Set last UDP recived sequence number. |
LeaderFollowersThreadPool |
getLeaderFollowersThreadPool()
Get LF thread pool. |
java.util.logging.Logger |
getLogger()
Get logger. |
int |
getMaxArrayBytes()
Get max array payload size. |
Reactor |
getReactor()
Get context reactor. |
gov.aps.jca.cas.Server |
getServer()
Get server implementation. |
java.net.InetAddress |
getServerInetAddress()
Get server newtwork (IP) address. |
int |
getServerPort()
Get server port. |
Timer |
getTimer()
Get timer. |
CATransportRegistry |
getTransportRegistry()
Get CA transport (virtual circuit) registry. |
gov.aps.jca.Version |
getVersion()
Get context version. |
void |
initialize(gov.aps.jca.cas.Server server)
Set server and initialize. |
protected void |
initializeLogger()
Initialize context logger. |
void |
invalidateLastReceivedSequence()
Invalidate last (UDP) received sequence. |
boolean |
isAutoBeaconAddressList()
Get beacon address list auto flag. |
boolean |
isDestroyed()
Get destruction status. |
boolean |
isInitialized()
Get initialization status. |
protected void |
loadConfiguration()
Load configuration. |
void |
printInfo(java.io.PrintStream out)
|
void |
removeContextExceptionListener(gov.aps.jca.event.ContextExceptionListener l)
|
void |
removeContextMessageListener(gov.aps.jca.event.ContextMessageListener l)
|
void |
run(int seconds)
Run server (process events). |
void |
setLastReceivedSequenceNumber(int seqNo)
Set last UDP recived sequence number. |
void |
setServerPort(int port)
Set server port number. |
void |
shutdown()
|
| Methods inherited from class gov.aps.jca.cas.ServerContext |
|---|
dispose, printInfo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final gov.aps.jca.Version VERSION
public static final java.lang.String CAJ_SINGLE_THREADED_MODEL
protected java.util.logging.Logger logger
protected java.lang.String beaconAddressList
protected java.lang.String ignoreAddressList
protected boolean autoBeaconAddressList
protected float beaconPeriod
protected int beaconPort
protected int serverPort
protected int maxArrayBytes
protected java.util.ArrayList contextMessageListeners
protected java.util.ArrayList contextExceptionListeners
protected Timer timer
protected Reactor reactor
protected LeaderFollowersThreadPool leaderFollowersThreadPool
protected BroadcastTransport broadcastTransport
protected BeaconEmitter beaconEmitter
protected CASAcceptor acceptor
protected CATransportRegistry transportRegistry
protected CachedByteBufferAllocator cachedBufferAllocator
protected gov.aps.jca.cas.Server server
protected java.lang.Object runLock
| Constructor Detail |
|---|
public CAJServerContext()
| Method Detail |
|---|
public gov.aps.jca.Version getVersion()
getVersion in class gov.aps.jca.cas.ServerContextContext.getVersion()protected void initializeLogger()
protected void loadConfiguration()
public void configure(gov.aps.jca.configuration.Configuration configuration)
throws gov.aps.jca.configuration.ConfigurationException
configure in interface gov.aps.jca.configuration.Configurablegov.aps.jca.configuration.ConfigurationExceptionConfigurable.configure(gov.aps.jca.configuration.Configuration)
public gov.aps.jca.event.ContextMessageListener[] getContextMessageListeners()
throws java.lang.IllegalStateException
getContextMessageListeners in class gov.aps.jca.cas.ServerContextjava.lang.IllegalStateExceptionContext.getContextMessageListeners()
public void addContextMessageListener(gov.aps.jca.event.ContextMessageListener l)
throws gov.aps.jca.CAException,
java.lang.IllegalStateException
addContextMessageListener in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
java.lang.IllegalStateExceptionContext.addContextMessageListener(gov.aps.jca.event.ContextMessageListener)
public void removeContextMessageListener(gov.aps.jca.event.ContextMessageListener l)
throws gov.aps.jca.CAException,
java.lang.IllegalStateException
removeContextMessageListener in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
java.lang.IllegalStateExceptionContext.removeContextMessageListener(gov.aps.jca.event.ContextMessageListener)
public gov.aps.jca.event.ContextExceptionListener[] getContextExceptionListeners()
throws java.lang.IllegalStateException
getContextExceptionListeners in class gov.aps.jca.cas.ServerContextjava.lang.IllegalStateExceptionContext.getContextExceptionListeners()
public void addContextExceptionListener(gov.aps.jca.event.ContextExceptionListener l)
throws gov.aps.jca.CAException,
java.lang.IllegalStateException
addContextExceptionListener in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
java.lang.IllegalStateExceptionContext.addContextExceptionListener(gov.aps.jca.event.ContextExceptionListener)
public void removeContextExceptionListener(gov.aps.jca.event.ContextExceptionListener l)
throws gov.aps.jca.CAException,
java.lang.IllegalStateException
removeContextExceptionListener in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
java.lang.IllegalStateExceptionContext.removeContextExceptionListener(gov.aps.jca.event.ContextExceptionListener)
protected void checkState()
throws gov.aps.jca.CAException,
java.lang.IllegalStateException
gov.aps.jca.CAException
java.lang.IllegalStateException
public void initialize(gov.aps.jca.cas.Server server)
throws gov.aps.jca.CAException,
java.lang.IllegalStateException
initialize in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
java.lang.IllegalStateExceptionServerContext.initialize(gov.aps.jca.cas.Server)
public void run(int seconds)
throws gov.aps.jca.CAException,
java.lang.IllegalStateException
run in class gov.aps.jca.cas.ServerContextseconds - time in seconds the server will process events (method will block), if 0
the method would block until destory() is called.
java.lang.IllegalStateException - if server is already destroyed.
gov.aps.jca.CAException
public void shutdown()
throws gov.aps.jca.CAException,
java.lang.IllegalStateException
shutdown in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
java.lang.IllegalStateExceptionServerContext.shutdown()
public void destroy()
throws gov.aps.jca.CAException,
java.lang.IllegalStateException
destroy in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
java.lang.IllegalStateExceptionContext.destroy()
public void printInfo(java.io.PrintStream out)
throws java.lang.IllegalStateException
printInfo in class gov.aps.jca.cas.ServerContextjava.lang.IllegalStateExceptionContext.printInfo(java.io.PrintStream)public boolean isInitialized()
public boolean isDestroyed()
public java.lang.String getBeaconAddressList()
public boolean isAutoBeaconAddressList()
public float getBeaconPeriod()
public java.util.logging.Logger getLogger()
getLogger in interface LoggerProviderpublic int getMaxArrayBytes()
public int getBeaconPort()
public int getServerPort()
getServerPort in interface CAContextpublic void setServerPort(int port)
port - new server port number.public int getBroadcastPort()
getBroadcastPort in interface CAContextpublic java.lang.String getIgnoreAddressList()
public java.net.InetAddress getServerInetAddress()
null if not bounded.public Reactor getReactor()
getReactor in interface CAContextpublic BroadcastTransport getBroadcastTransport()
getBroadcastTransport in interface CAContextpublic CATransportRegistry getTransportRegistry()
getTransportRegistry in interface CAContextpublic Timer getTimer()
getTimer in interface CAContextpublic CachedByteBufferAllocator getCachedBufferAllocator()
getCachedBufferAllocator in interface CAContextpublic LeaderFollowersThreadPool getLeaderFollowersThreadPool()
getLeaderFollowersThreadPool in interface CAContextnull if disabled.public gov.aps.jca.cas.Server getServer()
public int generateChannelSID()
public final void setLastReceivedSequenceNumber(int seqNo)
seqNo - last UDP recived sequence number.public final int getLastReceivedSequenceNumber(int seqNo)
seqNo - last UDP recived sequence number.public final void invalidateLastReceivedSequence()
CAContext
invalidateLastReceivedSequence in interface CAContextCAContext.invalidateLastReceivedSequence()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||