|
||||||||||
| 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 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 String |
CAJ_SINGLE_THREADED_MODEL
String value of the JVM property key to turn on single threaded model. |
protected ArrayList |
contextExceptionListeners
List of context exception listeners. |
protected ArrayList |
contextMessageListeners
List of context message listeners. |
protected String |
ignoreAddressList
A space-separated list of address from which to ignore name resolution requests. |
protected LeaderFollowersThreadPool |
leaderFollowersThreadPool
Leader/followers thread pool. |
protected 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 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. |
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()
|
String |
getIgnoreAddressList()
Get ignore search address list. |
int |
getLastReceivedSequenceNumber(int seqNo)
Set last UDP recived sequence number. |
LeaderFollowersThreadPool |
getLeaderFollowersThreadPool()
Get LF thread pool. |
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. |
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(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 String CAJ_SINGLE_THREADED_MODEL
protected Logger logger
protected String beaconAddressList
protected String ignoreAddressList
protected boolean autoBeaconAddressList
protected float beaconPeriod
protected int beaconPort
protected int serverPort
protected int maxArrayBytes
protected ArrayList contextMessageListeners
protected 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 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 IllegalStateException
getContextMessageListeners in class gov.aps.jca.cas.ServerContextIllegalStateExceptionContext.getContextMessageListeners()
public void addContextMessageListener(gov.aps.jca.event.ContextMessageListener l)
throws gov.aps.jca.CAException,
IllegalStateException
addContextMessageListener in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
IllegalStateExceptionContext.addContextMessageListener(gov.aps.jca.event.ContextMessageListener)
public void removeContextMessageListener(gov.aps.jca.event.ContextMessageListener l)
throws gov.aps.jca.CAException,
IllegalStateException
removeContextMessageListener in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
IllegalStateExceptionContext.removeContextMessageListener(gov.aps.jca.event.ContextMessageListener)
public gov.aps.jca.event.ContextExceptionListener[] getContextExceptionListeners()
throws IllegalStateException
getContextExceptionListeners in class gov.aps.jca.cas.ServerContextIllegalStateExceptionContext.getContextExceptionListeners()
public void addContextExceptionListener(gov.aps.jca.event.ContextExceptionListener l)
throws gov.aps.jca.CAException,
IllegalStateException
addContextExceptionListener in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
IllegalStateExceptionContext.addContextExceptionListener(gov.aps.jca.event.ContextExceptionListener)
public void removeContextExceptionListener(gov.aps.jca.event.ContextExceptionListener l)
throws gov.aps.jca.CAException,
IllegalStateException
removeContextExceptionListener in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
IllegalStateExceptionContext.removeContextExceptionListener(gov.aps.jca.event.ContextExceptionListener)
protected void checkState()
throws gov.aps.jca.CAException,
IllegalStateException
gov.aps.jca.CAException
IllegalStateException
public void initialize(gov.aps.jca.cas.Server server)
throws gov.aps.jca.CAException,
IllegalStateException
initialize in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
IllegalStateExceptionServerContext.initialize(gov.aps.jca.cas.Server)
public void run(int seconds)
throws gov.aps.jca.CAException,
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.
IllegalStateException - if server is already destroyed.
gov.aps.jca.CAException
public void shutdown()
throws gov.aps.jca.CAException,
IllegalStateException
shutdown in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
IllegalStateExceptionServerContext.shutdown()
public void destroy()
throws gov.aps.jca.CAException,
IllegalStateException
destroy in class gov.aps.jca.cas.ServerContextgov.aps.jca.CAException
IllegalStateExceptionContext.destroy()
public void printInfo(PrintStream out)
throws IllegalStateException
printInfo in class gov.aps.jca.cas.ServerContextIllegalStateExceptionContext.printInfo(java.io.PrintStream)public boolean isInitialized()
public boolean isDestroyed()
public String getBeaconAddressList()
public boolean isAutoBeaconAddressList()
public float getBeaconPeriod()
public 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 String getIgnoreAddressList()
public 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 | |||||||||