org.resoa.stack.protocol.service
Class ProtocolServiceImpl

java.lang.Object
  extended by org.resoa.stack.protocol.service.ProtocolServiceImpl
All Implemented Interfaces:
ProtocolService
Direct Known Subclasses:
AESKeyClient, AESKeyServer, ConnectionRequest, DisconnectIndication, MonitorStatus, MonitorStatusRequest, Ping, ProfileHandler, ProfileRequest, SocketInitialized, StackConfigInfo

public abstract class ProtocolServiceImpl
extends java.lang.Object
implements ProtocolService


Field Summary
protected  org.slf4j.Logger logger
           
protected  java.lang.String protserviceID
           
protected  Stack stack
           
 
Constructor Summary
protected ProtocolServiceImpl(Stack stack, java.lang.String serviceID)
          Constructor
 
Method Summary
 void execute(org.resoa.grid.GridSession session)
          Excute the protocol service
protected  byte[] getActivationMap()
           
 boolean isActive()
          is the protocol service activated within stack?
protected abstract  void onExecute(org.resoa.grid.Message msg)
          Invoked during execute
abstract  void onNewMessage(org.resoa.grid.Message msg)
          invoked on incoming protocol message
protected  void setActivationMap(byte[] activationMap)
           
 void setActive(boolean active)
          set the protocol service active flag?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.slf4j.Logger logger

protserviceID

protected java.lang.String protserviceID

stack

protected Stack stack
Constructor Detail

ProtocolServiceImpl

protected ProtocolServiceImpl(Stack stack,
                              java.lang.String serviceID)
Constructor

Parameters:
stack - the stack
serviceID - the serviceID
Method Detail

isActive

public boolean isActive()
Description copied from interface: ProtocolService
is the protocol service activated within stack?

Specified by:
isActive in interface ProtocolService
Returns:
Returns the active.

setActive

public void setActive(boolean active)
Description copied from interface: ProtocolService
set the protocol service active flag?

Specified by:
setActive in interface ProtocolService
Parameters:
active - The active to set.

onExecute

protected abstract void onExecute(org.resoa.grid.Message msg)
                           throws java.lang.Exception
Invoked during execute

Parameters:
msg - the message
Throws:
java.lang.Exception

execute

public void execute(org.resoa.grid.GridSession session)
             throws org.resoa.exception.ProtocolException
Description copied from interface: ProtocolService
Excute the protocol service

Specified by:
execute in interface ProtocolService
Throws:
org.resoa.exception.ProtocolException

onNewMessage

public abstract void onNewMessage(org.resoa.grid.Message msg)
                           throws org.resoa.exception.ProtocolException
Description copied from interface: ProtocolService
invoked on incoming protocol message

Specified by:
onNewMessage in interface ProtocolService
Throws:
org.resoa.exception.ProtocolException

getActivationMap

protected byte[] getActivationMap()
Returns:
Returns the activationMap.

setActivationMap

protected void setActivationMap(byte[] activationMap)
Parameters:
activationMap - The activationMap to set.


Copyright © 2007 www.resoa.org. All Rights Reserved.