de.fhg.igd.semoa.comm
Class Pods

java.lang.Object
  extended byde.fhg.igd.semoa.service.AbstractService
      extended byde.fhg.igd.semoa.net.AbstractServer
          extended byde.fhg.igd.semoa.net.RequestServer
              extended byde.fhg.igd.semoa.comm.Pod
                  extended byde.fhg.igd.semoa.comm.Pods
All Implemented Interfaces:
AgentGateway, MessageGateway.In, Runnable, Server, Service

public class Pods
extends Pod
implements MessageGateway.In

Provides an SSL server that listens on incoming network connections for incoming messages. This implementation requires the SSLMaster, which should be published under the path for WhatIs key "SSL_MASTER".

Version:
"$Revision: 1.8 $/$Date: 2007-08-08 04:41:53 +0200 (Wed, 08 Aug 2007) $"
Author:
Stivens Milic

Nested Class Summary
 
Nested classes inherited from class de.fhg.igd.semoa.net.AbstractServer
AbstractServer.Job
 
Nested classes inherited from class de.fhg.igd.semoa.server.AgentGateway
AgentGateway.In, AgentGateway.Out
 
Field Summary
static String CIPHER_SUITE
          The enabled cipher suit name.
private static boolean CLIENT_AUTHENTICATION
          Flag that enables/disables client authentication.
private static String[] DEPEND_
          The dependencies to other objects in the global Environment.
private  SSLServerSocketFactory factory_
          The ServerSocketFactory for SSL sockets.
private  Object lock_
          The internal lock object.
static String PROTOCOL
          The protocol name.
 
Fields inherited from class de.fhg.igd.semoa.net.AbstractServer
bad_, DEFAULT_CAPACITY, good_, MAX_CAPACITY, thread_
 
Fields inherited from class de.fhg.igd.semoa.service.AbstractService
REV_POSTFIX, REV_PREFIX
 
Fields inherited from interface de.fhg.igd.semoa.net.Server
BOUND_TO_PORT, ERROR, RUNNING, SHUTDOWN, UNDEFINED
 
Constructor Summary
Pods()
          Creates a new instance.
 
Method Summary
 String author()
          Returns the name of the author of the service.
protected  ServerSocket createServerSocket()
          Creates a ServerSocket with the initialized SSLServerSocketFactory factory_ and initialized it for use with specified CIPHER_SUITE.
 String[] dependencies()
          Returns the dependencies of this service as described in Service.
 String info()
          Returns the informative string which should describe the service's essence in a sentence.
protected  void initServerSocketFactory()
          Initialized the SSLServerSocketFactory that is needed for creation of SSLServerSocket.
 String protocol()
           
 String revision()
          Returns the revision number of this class as a string.
 String toString()
           
 
Methods inherited from class de.fhg.igd.semoa.comm.Pod
createRequest
 
Methods inherited from class de.fhg.igd.semoa.net.RequestServer
handleConnection
 
Methods inherited from class de.fhg.igd.semoa.net.AbstractServer
bad, createJob, exceptionInfo, getCapacity, getMaximumSize, getPort, getServerState, good, isEnabled, localURL, rebind, run, serverStateChanged, setCapacity, setEnabled, setMaximumSize, setPort, shutdown, signal
 
Methods inherited from class de.fhg.igd.semoa.service.AbstractService
checkDependencies, docs, doPrivileged, doPrivileged, getACC, getEnvironment, majorVersion, minorVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.fhg.igd.semoa.server.MessageGateway.In
getMaximumSize, localURL, setMaximumSize
 
Methods inherited from interface de.fhg.igd.semoa.server.AgentGateway
isEnabled, setEnabled
 

Field Detail

DEPEND_

private static final String[] DEPEND_
The dependencies to other objects in the global Environment.


PROTOCOL

public static final String PROTOCOL
The protocol name.

See Also:
Constant Field Values

CLIENT_AUTHENTICATION

private static final boolean CLIENT_AUTHENTICATION
Flag that enables/disables client authentication.

See Also:
Constant Field Values

lock_

private Object lock_
The internal lock object.


factory_

private SSLServerSocketFactory factory_
The ServerSocketFactory for SSL sockets.


CIPHER_SUITE

public static final String CIPHER_SUITE
The enabled cipher suit name.

See Also:
Constant Field Values
Constructor Detail

Pods

public Pods()
Creates a new instance.

Method Detail

author

public String author()
Description copied from class: AbstractService
Returns the name of the author of the service. The format to be used should be John Doe <jdoe@zilch.net>.

Specified by:
author in interface Service
Overrides:
author in class AbstractServer
Returns:
The name of the author of this server.

info

public String info()
Description copied from class: AbstractService
Returns the informative string which should describe the service's essence in a sentence.

Specified by:
info in interface Service
Overrides:
info in class Pod

revision

public String revision()
Description copied from class: AbstractService
Returns the revision number of this class as a string. This class provides default implementations of methods majorVersion(), minorVersion based on the assumption that this method returns a revision string as generated by rcs(1) for the template "$Revision: 1.7 $/$Date: 2007-08-08 04:41:53 +0200 (Wed, 08 Aug 2007) $".

Overrides:
revision in class Pod

dependencies

public String[] dependencies()
Description copied from class: AbstractService
Returns the dependencies of this service as described in Service. This default implementation returns an array of length 0.

Specified by:
dependencies in interface Service
Overrides:
dependencies in class Pod

protocol

public String protocol()
Specified by:
protocol in interface AgentGateway
Overrides:
protocol in class Pod
Returns:
The protocol name; in this case "raw".

initServerSocketFactory

protected void initServerSocketFactory()
Initialized the SSLServerSocketFactory that is needed for creation of SSLServerSocket.


createServerSocket

protected ServerSocket createServerSocket()
                                   throws IOException
Creates a ServerSocket with the initialized SSLServerSocketFactory factory_ and initialized it for use with specified CIPHER_SUITE.

Overrides:
createServerSocket in class AbstractServer
Returns:
SSLServerSocket with enabled chiper suit
Throws:
IOException - if the socket cannot be opened due to an I/O error.

toString

public String toString()
Overrides:
toString in class AbstractServer
Returns:
The string representation of this instance. This default implementation returns information on the author, version, revision, and general info.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.