|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.vinci.transport.VinciServableAdapter
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS
public class LocalVNS
LOCAL Vinci Naming Service. Used by locally deployed TAEs. Locally, meaning TAEs running on the same machine but in different JVM. This VNS is primarily used by TAEs to advertise their availability after succesfull startup.
Constructor Summary | |
---|---|
LocalVNS()
|
|
LocalVNS(int aStartPort,
int aEndPort,
int aVNSPort)
Initialize local VNS instance with a range of ports, and the port for the VNS itself. |
|
LocalVNS(java.lang.String aStartPort,
java.lang.String aEndPort,
java.lang.String aVNSPort)
Instantiates Local Vinci Naming Service |
Method Summary | |
---|---|
Transportable |
eval(Transportable in)
Main method called by services advertising their availability. |
protected void |
finalize()
|
int |
getPort()
Returns the next available port. |
int |
getVNSPort()
Returns the port number on which local VNS is listening for requests. |
boolean |
isAvailable(int port)
Determines if a given port is free. |
void |
run()
Starts VNS thread. |
void |
setConnectionPool(BoundedWorkQueue pQueue)
Associates a port pool with instance of VNS. |
void |
shutdown()
Stop the VNS service |
Methods inherited from class org.apache.vinci.transport.VinciServableAdapter |
---|
cleanExit, makeTransportable |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalVNS()
public LocalVNS(java.lang.String aStartPort, java.lang.String aEndPort, java.lang.String aVNSPort) throws java.net.PortUnreachableException
aProcessor
- -
CASProcessor instantiating this VNS (the owner)aStartPort
- -
a starting port # for clients (services)aEndPort
- -
an ending port # for clients( services)aVNSPort
- -
port on which this VNS will listen on
java.net.PortUnreachableException
public LocalVNS(int aStartPort, int aEndPort, int aVNSPort) throws java.net.PortUnreachableException
aStartPort
- -
starting port number usedaEndPort
- -
end port number. Together with StartPort defines the range of ports (port pool)aVNSPort
- -
port on which this VNS will listen for requests
java.net.PortUnreachableException
Method Detail |
---|
public void setConnectionPool(BoundedWorkQueue pQueue)
pQueue
- -
queue where allocated ports will be addedpublic boolean isAvailable(int port)
-
- port number to checkpublic int getVNSPort()
public int getPort() throws java.net.PortUnreachableException
java.net.PortUnreachableException
public Transportable eval(Transportable in) throws ServiceException
eval
in interface VinciServable
eval
in class VinciServableAdapter
in
- The input document
ServiceException
- thrown when there is an application level error that should result in the client
receiving the same ServiceException on the other end.public void shutdown()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |