Package org.openas2.cmd.processor
Class SocketCommandProcessor
- java.lang.Object
-
- org.openas2.cmd.processor.BaseCommandProcessor
-
- org.openas2.cmd.processor.SocketCommandProcessor
-
- All Implemented Interfaces:
CommandProcessor
,Component
,HasSchedule
public class SocketCommandProcessor extends BaseCommandProcessor
actual socket command processor takes commands from socket/port and passes them to the OpenAS2Server message format <command userid="abc" pasword="xyz"> the actual command </command>when inited the valid userid and password is passed, then as each command is processed the processCommand method verifies the two fields correctness
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.commons.logging.Log
logger
(package private) SocketCommandParser
parser
private java.lang.String
password
private java.io.BufferedReader
rdr
private java.lang.String
responseFormat
private javax.net.ssl.SSLServerSocket
sslserversocket
private java.lang.String
userid
private java.io.BufferedWriter
wrtr
-
Constructor Summary
Constructors Constructor Description SocketCommandProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Component lifecycle hook.void
init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters)
Component lifecycle hook.void
processCommand()
-
Methods inherited from class org.openas2.cmd.processor.BaseCommandProcessor
addCommands, getCommand, getCommands, getName, getParameters, getSession, schedule, terminate
-
-
-
-
Field Detail
-
parser
SocketCommandParser parser
-
rdr
private java.io.BufferedReader rdr
-
wrtr
private java.io.BufferedWriter wrtr
-
sslserversocket
private javax.net.ssl.SSLServerSocket sslserversocket
-
userid
private java.lang.String userid
-
password
private java.lang.String password
-
responseFormat
private java.lang.String responseFormat
-
logger
private org.apache.commons.logging.Log logger
-
-
Method Detail
-
init
public void init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters) throws OpenAS2Exception
Description copied from interface:Component
Component lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.- Specified by:
init
in interfaceComponent
- Overrides:
init
in classBaseCommandProcessor
- Parameters:
session
- the component uses this object to access other componentsparameters
- configuration values for the component- Throws:
OpenAS2Exception
- If an error occurs while initializing the component- See Also:
Session
-
processCommand
public void processCommand() throws OpenAS2Exception
- Specified by:
processCommand
in interfaceCommandProcessor
- Specified by:
processCommand
in classBaseCommandProcessor
- Throws:
OpenAS2Exception
-
destroy
public void destroy() throws java.lang.Exception
Description copied from interface:Component
Component lifecycle hook. If lifecycle ofComponent
requires a destroy function this method can be used.- Specified by:
destroy
in interfaceComponent
- Overrides:
destroy
in classBaseCommandProcessor
- Throws:
java.lang.Exception
- Something went wrong- See Also:
Component.init(Session, Map)
,Session
-
-