Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nl.tudelft.simulation.dsol.formalisms.flow
Class Seize

    java.lang.Object
      nl.tudelft.simulation.event.EventProducer
          nl.tudelft.simulation.dsol.formalisms.flow.Station
              nl.tudelft.simulation.dsol.formalisms.flow.Seize

All Implemented Interfaces:
  nl.tudelft.simulation.event.EventProducerInterface, ResourceRequestorInterface, java.io.Serializable, StationInterface

public class Seize
extends Station
implements ResourceRequestorInterface

The Seize requests a resource and releases an entity whenever this resource is actually claimed.

(c) copyright 2003 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Since:
  1.0
Version:
  1.5 2004-03-26
Author:
  Peter Jacobs
See Also:
  Serialized Form

Field Summary
`static nl.tudelft.simulation.event.EventType` | `DELAY_TIME` DELAY_TIME is fired when a new delayTime is computed
`static nl.tudelft.simulation.event.EventType` | `QUEUE_LENGTH_EVENT` QUEUE_LENGTH_EVENT is fired when the queue length is changed

Fields inherited from class nl.tudelft.simulation.dsol.formalisms.flow.Station
`destination, simulator`

Fields inherited from class nl.tudelft.simulation.event.EventProducer
`listeners`

Fields inherited from interface nl.tudelft.simulation.dsol.formalisms.flow.StationInterface
`RECEIVE_EVENT, RELEASE_EVENT`

Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
`FIRST_POSITION, LAST_POSITION`

Constructor Summary
`Seize(DEVSSimulatorInterface simulator, Resource resource)` Constructor for Seize.
`Seize(DEVSSimulatorInterface simulator, Resource resource, double requestedCapacity)` Constructor for Seize.

Method Summary
`java.util.List` | `getQueue()` returns the queue
`void` | `receiveObject(java.lang.Object object)` receives an object is invoked whenever an entity arrives
`void` | `receiveObject(java.lang.Object object, double requestedCapacity)` receives an object which request an amount
`void` | `receiveRequestedResource(double requestedCapacity, Resource resource)` receive the requested resource
`void` | `setQueue(java.util.List queue)` sets the queue to this seize.

Methods inherited from class nl.tudelft.simulation.dsol.formalisms.flow.Station
`getDestination, releaseObject, setDestination`

Methods inherited from class nl.tudelft.simulation.event.EventProducer
`addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface
`addListener, addListener, addListener, addListener, getEventTypes, removeListener`

Field Detail

### QUEUE_LENGTH_EVENT

    public static final nl.tudelft.simulation.event.EventType QUEUE_LENGTH_EVENT

  QUEUE_LENGTH_EVENT is fired when the queue length is changed

### DELAY_TIME

    public static final nl.tudelft.simulation.event.EventType DELAY_TIME

  DELAY_TIME is fired when a new delayTime is computed

Constructor Detail

### Seize

    public Seize(DEVSSimulatorInterface simulator,
                 Resource resource)

  Constructor for Seize.

Parameters:
  `simulator` - on which behavior is scheduled
  `resource` - which is claimed

### Seize

    public Seize(DEVSSimulatorInterface simulator,
                 Resource resource,
                 double requestedCapacity)

  Constructor for Seize.

Parameters:
  `simulator` - on which behavior is scheduled
  `resource` - which is claimed
  `requestedCapacity` - is the amount which is claimed by the seize

Method Detail

### receiveObject

    public void receiveObject(java.lang.Object object,
                              double requestedCapacity)
                       throws java.rmi.RemoteException

  receives an object which request an amount

  Parameters:
    `object` - the object
    `requestedCapacity` - the requested capacity
  Throws:
    `java.rmi.RemoteException` - on network failures

### receiveObject

    public void receiveObject(java.lang.Object object)
                       throws java.rmi.RemoteException

  Description copied from interface: `StationInterface`
  receives an object is invoked whenever an entity arrives

  Specified by:
    `receiveObject` in interface `StationInterface`
  Overrides:
    `receiveObject` in class `Station`
  Throws:
    `java.rmi.RemoteException`
  See Also:
    `StationInterface.receiveObject(Object)`

### setQueue

    public void setQueue(java.util.List queue)

  sets the queue to this seize. This enables seize blocks to share one queue.

  Parameters:
    `queue` - is a new queue.

### getQueue

    public java.util.List getQueue()

  returns the queue

  Returns:
    List the queue

### receiveRequestedResource

    public void receiveRequestedResource(double requestedCapacity,
                                         Resource resource)
                                  throws java.rmi.RemoteException

  Description copied from interface: `ResourceRequestorInterface`
  receive the requested resource

  Specified by:
    `receiveRequestedResource` in interface `ResourceRequestorInterface`
  Parameters:
    `requestedCapacity` - reflects the amount requested
    `resource` - the requested resource
  Throws:
    `java.rmi.RemoteException` - on network failure
  See Also:
    `#receiveRequestedResource(double, nl.tudelft.simulation.dsol.formalisms.Resource)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2004 Delft University of Technology, the Netherlands. All Rights Reserved.