jSyncManager Simple Java Server

org.jSyncManager.SJS.Adapters.SMTPServer
Class AbstractSMTPServer.State

java.lang.Object
  extended by org.jSyncManager.SJS.Adapters.SMTPServer.AbstractSMTPServer.State
Enclosing class:
AbstractSMTPServer

public static class AbstractSMTPServer.State
extends java.lang.Object

Stores a mutable long for the masks which represent the state information


Field Summary
(package private)  long state
          the actual state mask of bits
 
Constructor Summary
AbstractSMTPServer.State()
          creates a state with no bits set
AbstractSMTPServer.State(long s)
          creates a state with some bits initially set
 
Method Summary
 boolean areBitsSet(long mask)
          Checks whether the given bits are currently set in the state
 void clearBits(long mask)
          Removes the bits specified in the mask from the state
 long getState()
          get the current state value
 void insertBits(long mask)
          inserts the given bits into the current state
 void setState(long s)
          Sets the state to exactly the given value, any current bits are cleared
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

long state
the actual state mask of bits

Constructor Detail

AbstractSMTPServer.State

public AbstractSMTPServer.State()
creates a state with no bits set


AbstractSMTPServer.State

public AbstractSMTPServer.State(long s)
creates a state with some bits initially set

Parameters:
s - the initial state value
Method Detail

areBitsSet

public boolean areBitsSet(long mask)
Checks whether the given bits are currently set in the state

Parameters:
mask - long value of bits to check for
Returns:
true if all bits in the given mask are set, false otherwise

setState

public void setState(long s)
Sets the state to exactly the given value, any current bits are cleared

Parameters:
s - the new state value

getState

public long getState()
get the current state value

Returns:
the current state

insertBits

public void insertBits(long mask)
inserts the given bits into the current state

Parameters:
mask -

clearBits

public void clearBits(long mask)
Removes the bits specified in the mask from the state

Parameters:
mask -

jSyncManager Simple Java Server

Copyright (c) 2004 Brad BARCLAY. All Rights Reserved.