Keel 2.1RC2

org.keel.comm.jbossmq.server
Class KeelJBossMQServer

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.keel.servers.KeelAbstractServer
          extended byorg.keel.comm.jbossmq.server.KeelJBossMQServer
All Implemented Interfaces:
EventListener, java.lang.Runnable

public class KeelJBossMQServer
extends KeelAbstractServer

This is the Keel server thread for distributed servers where the clinet/server run under different JVMs, even different machines/networks. This is a JMS based implementation, particularly for the JBossMQ JMS library. It is "launched" by the KeelServer class.

Version:
$Revision: 1.1 $ $Date: 2004/03/07 19:03:12 $
Author:
Michael Nash, Shash Chatterjee Created on Nov 16, 2002

Nested Class Summary
 
Nested classes inherited from class org.keel.servers.KeelAbstractServer
 
Field Summary
private  int ackMode
           
private  java.lang.String[] args
           
private  boolean initialized
           
private  java.lang.String jndiHost
           
private  java.lang.String jndiMode
           
private  java.lang.String jndiModeType
           
private  java.lang.String jndiName
           
private  java.lang.String jndiPort
           
private  java.lang.String jndiType
           
private  java.lang.String jndiURL
           
private  Configuration myConfig
           
private  javax.naming.Context namingContext
           
private  QueueConnection qConnection
           
private  QueueConnectionFactory qFactory
           
private  Queue queue
           
private  QueueReceiver receiver
           
 
Fields inherited from class org.keel.servers.KeelAbstractServer
logger, myContainer
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
KeelJBossMQServer()
           
 
Method Summary
private  void configure()
           
protected  java.lang.String getJndiHost()
          Returns the jndiHost.
protected  java.lang.String getJndiMode()
          Returns the jndiMode.
protected  java.lang.String getJndiModeType()
          Returns the jndiModeType.
protected  java.lang.String getJndiName()
          Returns the jndiName.
protected  java.lang.String getJndiPort()
          Returns the jndiPort.
protected  java.lang.String getJndiType()
          Returns the jndiType.
protected  java.lang.String getJndiURL()
          Returns the jndiURL.
protected  javax.naming.Context getNamingContext()
           
protected  QueueConnection getQueueConnection()
           
protected  QueueConnectionFactory getQueueConnectionFactory()
           
protected  QueueReceiver getQueueReceiver()
           
protected  boolean isInitialized()
           
protected  void messageLoop()
           
 void parseArgs()
           
 void run()
           
 void setArgs(java.lang.String[] args)
          Receive the equivilant of our command-line arguments from the KeelServer class.
 void setJndiHost(java.lang.String jndiHost)
          Sets the jndiHost.
 void setJndiMode(java.lang.String jndiMode)
          Sets the jndiMode.
 void setJndiModeType(java.lang.String jndiModeType)
          Sets the jndiModeType.
 void setJndiName(java.lang.String jndiName)
          Sets the jndiName.
 void setJndiPort(java.lang.String jndiPort)
          Sets the jndiPort.
 void setJndiType(java.lang.String jndiType)
          Sets the jndiType.
 void setJndiURL(java.lang.String jndiURL)
          Sets the jndiURL.
 
Methods inherited from class org.keel.servers.KeelAbstractServer
getContainer, getContext, getLogger, initialize, receiveEvent, saveContext, setInitialized, shutDown
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

args

private java.lang.String[] args

initialized

private boolean initialized

ackMode

private int ackMode

jndiHost

private java.lang.String jndiHost

jndiPort

private java.lang.String jndiPort

jndiName

private java.lang.String jndiName

jndiMode

private java.lang.String jndiMode

jndiModeType

private java.lang.String jndiModeType

jndiType

private java.lang.String jndiType

jndiURL

private java.lang.String jndiURL

myConfig

private Configuration myConfig

namingContext

private javax.naming.Context namingContext

qFactory

private QueueConnectionFactory qFactory

qConnection

private QueueConnection qConnection

queue

private Queue queue

receiver

private QueueReceiver receiver
Constructor Detail

KeelJBossMQServer

public KeelJBossMQServer()
Method Detail

run

public void run()
         throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException
See Also:
Runnable.run()

setArgs

public void setArgs(java.lang.String[] args)
Receive the equivilant of our command-line arguments from the KeelServer class.

Overrides:
setArgs in class KeelAbstractServer

parseArgs

public void parseArgs()
               throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

messageLoop

protected void messageLoop()
                    throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

getNamingContext

protected javax.naming.Context getNamingContext()
                                         throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

getQueueConnectionFactory

protected QueueConnectionFactory getQueueConnectionFactory()
                                                    throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

getQueueReceiver

protected QueueReceiver getQueueReceiver()
                                  throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

getQueueConnection

protected QueueConnection getQueueConnection()
                                      throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

getJndiHost

protected java.lang.String getJndiHost()
Returns the jndiHost.

Returns:
String

getJndiMode

protected java.lang.String getJndiMode()
Returns the jndiMode.

Returns:
String

getJndiName

protected java.lang.String getJndiName()
Returns the jndiName.

Returns:
String

getJndiPort

protected java.lang.String getJndiPort()
Returns the jndiPort.

Returns:
String

getJndiType

protected java.lang.String getJndiType()
Returns the jndiType.

Returns:
String

getJndiModeType

protected java.lang.String getJndiModeType()
Returns the jndiModeType.

Returns:
String

getJndiURL

protected java.lang.String getJndiURL()
Returns the jndiURL.

Returns:
String

setJndiHost

public void setJndiHost(java.lang.String jndiHost)
Sets the jndiHost.

Parameters:
jndiHost - The jndiHost to set

setJndiMode

public void setJndiMode(java.lang.String jndiMode)
Sets the jndiMode.

Parameters:
jndiMode - The jndiMode to set

setJndiName

public void setJndiName(java.lang.String jndiName)
Sets the jndiName.

Parameters:
jndiName - The jndiName to set

setJndiPort

public void setJndiPort(java.lang.String jndiPort)
Sets the jndiPort.

Parameters:
jndiPort - The jndiPort to set

setJndiType

public void setJndiType(java.lang.String jndiType)
Sets the jndiType.

Parameters:
jndiType - The jndiType to set

setJndiModeType

public void setJndiModeType(java.lang.String jndiModeType)
Sets the jndiModeType.

Parameters:
jndiModeType - The jndiModeType to set

setJndiURL

public void setJndiURL(java.lang.String jndiURL)
Sets the jndiURL.

Parameters:
jndiURL - The jndiURL to set

isInitialized

protected boolean isInitialized()
Overrides:
isInitialized in class KeelAbstractServer

configure

private void configure()

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.